This is an automated email from the ASF dual-hosted git repository.
aleks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new b74501b Upgrading to Gradle 7.2
b74501b is described below
commit b74501b43b8af115a2161e33044a73fe73eaa9dd
Author: Petri Tuomola <[email protected]>
AuthorDate: Sat Sep 11 22:40:49 2021 +0800
Upgrading to Gradle 7.2
---
.travis.yml | 2 +-
build.gradle | 36 ++++++++++++++++++++++++--------
fineract-client/build.gradle | 7 +++++--
fineract-provider/build.gradle | 16 ++++++++++++--
fineract-provider/dependencies.gradle | 14 +++++++++----
gradle/wrapper/gradle-wrapper.properties | 2 +-
integration-tests/build.gradle | 4 ----
7 files changed, 58 insertions(+), 23 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 3ea41c7..e159fa2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -74,6 +74,6 @@ script:
# using "&&" instead of several "-" means that integrationTest does not run if
test fails,
# and Docker test does not run if integration test fails, which makes PR
failure easier to understand.
# @see
https://docs.travis-ci.com/user/job-lifecycle/#customizing-the-build-phase
- - travis_wait 60 ./gradlew -q --no-daemon --console=plain licenseMain
licenseTest check build test --fail-fast doc && sudo service mysql stop &&
docker-compose build && docker-compose up -d && sleep 60s && curl -f -k
--retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30
https://localhost:8443/fineract-provider/actuator/health && (( $(curl -f -k
--retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30
https://localhost:8443/fineract-provider/actuator/ [...]
+ - ./gradlew -q --no-daemon --console=plain licenseMain licenseTest check
build test --fail-fast doc && sudo service mysql stop && docker-compose
build && docker-compose up -d && sleep 60s && curl -f -k --retry 5
--retry-connrefused --connect-timeout 30 --retry-delay 30
https://localhost:8443/fineract-provider/actuator/health && (( $(curl -f -k
--retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30
https://localhost:8443/fineract-provider/actuator/info | wc --cha [...]
# We stop the mysql system service when running the Docker test to avoid port
3306 conflicts (unless we run the mysql in docker-compose on another port; req.
FINERACT-773)
# The fancy /actuator/info test makes sure that has more than 100 characters
of JSON to test that the git.properties worked (see FINERACT-983)
diff --git a/build.gradle b/build.gradle
index 4f7188e..d9c0cd9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -38,7 +38,6 @@ buildscript {
}
}
repositories {
- jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
@@ -53,9 +52,11 @@ buildscript {
plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
+ id "org.barfuin.gradle.taskinfo" version "1.3.0"
+ id 'com.adarshr.test-logger' version '3.0.0'
id 'com.diffplug.spotless' version '5.15.0' apply false
id 'org.nosphere.apache.rat' version '0.7.0' apply false
- id 'com.github.hierynomus.license' version '0.15.0' apply false
+ id 'com.github.hierynomus.license' version '0.16.1' apply false
id 'org.openapi.generator' version '4.3.1' apply false
id 'org.zeroturnaround.gradle.jrebel' version '1.1.11' apply false
id 'org.springframework.boot' version '2.3.5.RELEASE' apply false
@@ -86,6 +87,7 @@ allprojects {
}
apply plugin: 'io.spring.dependency-management'
+ apply plugin: 'com.adarshr.test-logger'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'com.github.hierynomus.license'
apply plugin: 'org.nosphere.apache.rat'
@@ -469,6 +471,10 @@ configure(project.fineractJavaProjects) {
compileJava.dependsOn spotlessCheck
+ // compileJava may create more source files into generated, hence we need
to run these tasks after it
+ licenseMain.dependsOn compileJava
+ processResources.dependsOn compileJava
+
// If we are running Gradle within Eclipse to enhance classes with OpenJPA,
// set the classes directory to point to Eclipse's default build directory
if (project.hasProperty('env') && project.getProperty('env') == 'eclipse')
{
@@ -605,12 +611,10 @@ configure(project.fineractJavaProjects) {
test {
useJUnitPlatform()
- testLogging {
- // FINERACT-927
- events "skipped", "failed"
- showStandardStreams = false
- exceptionFormat "full"
- }
+ }
+
+ testlogger {
+ logLevel 'quiet'
}
// Configuration for spotbugs plugin
@@ -650,7 +654,6 @@ configure(project.fineractJavaProjects) {
}
configure(project.fineractPublishProjects) {
- apply plugin: 'maven'
apply plugin: 'maven-publish'
publishing {
@@ -689,3 +692,18 @@ configure(project.fineractPublishProjects) {
// TODO FINERACT-1102: Actually use this to deploy to ASF (Apache
Software Foundation) Nexus Maven Repository
}
}
+
+task printSourceSetInformation() {
+ doLast{
+ sourceSets.each { srcSet ->
+ println "["+srcSet.name+"]"
+ print "-->Source directories: "+srcSet.allJava.srcDirs+"\n"
+ print "-->Output directories:
"+srcSet.output.classesDirs.files+"\n"
+ print "-->Compile classpath:\n"
+ srcSet.compileClasspath.files.each {
+ print " "+it.path+"\n"
+ }
+ println ""
+ }
+ }
+}
diff --git a/fineract-client/build.gradle b/fineract-client/build.gradle
index 4bcbe9e..9f762cf 100644
--- a/fineract-client/build.gradle
+++ b/fineract-client/build.gradle
@@ -112,10 +112,13 @@ tasks.withType(JavaCompile) {
}
configurations {
- generatedCompile.extendsFrom implementation
- generatedRuntime.extendsFrom runtime
+ generatedCompileClasspath.extendsFrom implementation
+ generatedRuntimeClasspath.extendsFrom runtimeClasspath
}
test {
useJUnitPlatform()
}
+
+// Gradle 7.x asks for explicit dependencies between tasks
+licenseFormatBuildScripts.dependsOn spotlessGroovyGradle, spotlessJava,
spotlessMisc, compileJava, processResources, compileGeneratedJava,
compileTestJava, rat, test
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 7245b15..cf8b8e8 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -253,6 +253,7 @@ bootJar {
manifest {
attributes 'Main-Class':
'org.springframework.boot.loader.PropertiesLauncher'
}
+ dependsOn resolve
}
bootWar {
@@ -266,7 +267,8 @@ tasks.withType(Tar) {
distributions {
binary {
- baseName "apache-fineract-$releaseVersion-binary"
+ // TODO: Add the version number before enabling this
+ distributionBaseName = "apache-fineract-binary"
contents {
from bootJar
from war
@@ -284,7 +286,8 @@ distributions {
}
}
src {
- baseName "apache-fineract-$releaseVersion-src"
+ // TODO: Add the version number before enabling this
+ distributionBaseName = "apache-fineract-src"
contents {
from "$rootDir/"
exclude '**/build' , '.git', '.gradle', '.github', '.settings',
'.project', '.classpath', '.idea', 'out', '._.DS_Store', '.DS_Store',
'WebContent', '.externalToolbuilders', '.theia', '.gitpod.yml', '.travis.yml',
'LICENSE_RELEASE', 'NOTICE_RELEASE', '**/licenses/binary'
@@ -342,3 +345,12 @@ gitProperties {
// make sure the generateGitProperties task always executes (even when
git.properties is not changed)
generateGitProperties.outputs.upToDateWhen { false }
+
+// Gradle 7.x asks for explicit dependencies between tasks
+processResources.dependsOn generateGitProperties
+checkstyleMain.dependsOn resolve
+checkstyleTest.dependsOn resolve
+licenseMain.dependsOn processResources, generateGitProperties
+war.dependsOn resolve
+spotbugsTest.dependsOn resolve
+test.dependsOn resolve
diff --git a/fineract-provider/dependencies.gradle
b/fineract-provider/dependencies.gradle
index 4e2260c..cfc4368 100644
--- a/fineract-provider/dependencies.gradle
+++ b/fineract-provider/dependencies.gradle
@@ -38,7 +38,6 @@ dependencies {
'com.sun.jersey:jersey-servlet',
'com.sun.jersey:jersey-server',
- 'com.sun.jersey:jersey-json',
'com.sun.jersey.contribs:jersey-spring',
'com.sun.jersey.contribs:jersey-multipart',
@@ -53,7 +52,6 @@ dependencies {
'com.squareup.okhttp3:okhttp',
'com.squareup.okhttp3:okhttp-urlconnection',
- 'org.apache.commons:commons-email',
'org.apache.commons:commons-lang3',
'commons-io:commons-io',
'org.apache.poi:poi',
@@ -68,8 +66,6 @@ dependencies {
'com.github.spullara.mustache.java:compiler',
'com.jayway.jsonpath:json-path',
- 'org.dom4j:dom4j',
-
'javax.cache:cache-api',
'com.github.spotbugs:spotbugs-annotations',
@@ -80,9 +76,18 @@ dependencies {
'com.squareup.retrofit2:converter-gson',
'com.sun.activation:jakarta.activation:1.2.2'
)
+ implementation('org.apache.commons:commons-email') {
+ exclude group: 'javax.activation'
+ }
+ implementation('org.dom4j:dom4j') {
+ exclude group: 'javax.xml.bind'
+ }
implementation ('jakarta.xml.bind:jakarta.xml.bind-api') {
exclude group: 'jakarta.activation'
}
+ implementation ('com.sun.jersey:jersey-json') {
+ exclude group: 'com.sun.xml.bind'
+ }
implementation ('org.apache.activemq:activemq-broker') {
exclude group: 'org.apache.geronimo.specs'
}
@@ -101,6 +106,7 @@ dependencies {
}
implementation ('org.mnode.ical4j:ical4j') {
exclude group: 'commons-logging'
+ exclude group: 'javax.activation'
}
runtimeOnly('org.ehcache:ehcache') {
diff --git a/gradle/wrapper/gradle-wrapper.properties
b/gradle/wrapper/gradle-wrapper.properties
index 3ab0b72..ffed3a2 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle
index 73c974b..da6adba 100644
--- a/integration-tests/build.gradle
+++ b/integration-tests/build.gradle
@@ -63,8 +63,4 @@ cargoStartLocal.mustRunAfter 'testClasses'
test {
dependsOn cargoStartLocal
finalizedBy cargoStopLocal
-
- beforeTest { descriptor ->
- logger.lifecycle("Now running
$descriptor.className#$descriptor.displayName...")
- }
}