This is an automated email from the ASF dual-hosted git repository. juhan pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/fineract-cn-cheques.git
commit 1cd5b5f6a8f4f484e29fdf683c2159b902a34f6a Author: Juhan Aasaru <[email protected]> AuthorDate: Mon Sep 30 20:22:40 2019 +0300 FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks, FINCN-175 remove Netty warnings, set application to unique port --- api/build.gradle | 5 ++++- build.gradle | 7 +++++++ component-test/build.gradle | 7 +++++++ gradle/wrapper/gradle-wrapper.jar | Bin 54212 -> 54212 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- service/build.gradle | 25 +++++++++++++------------ service/src/main/resources/application.yml | 2 +- shared.gradle | 7 +------ travis.sh | 16 ++++++++++++---- 9 files changed, 47 insertions(+), 26 deletions(-) diff --git a/api/build.gradle b/api/build.gradle index a11f487..ef2cc86 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -21,7 +21,7 @@ buildscript { } dependencies { - classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE' + classpath 'io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE' } } @@ -29,6 +29,9 @@ plugins { id "com.github.hierynomus.license" version "0.13.1" id("org.nosphere.apache.rat") version "0.3.1" id "com.jfrog.artifactory" version "4.9.5" + id "io.spring.dependency-management" version "1.0.8.RELEASE" + id 'maven-publish' + id 'java' } apply from: '../shared.gradle' diff --git a/build.gradle b/build.gradle index eeb68fb..b125a56 100644 --- a/build.gradle +++ b/build.gradle @@ -53,6 +53,13 @@ task prepareForTest { dependsOn gradle.includedBuild('component-test').task(':build') } +task clean { + group 'all' + dependsOn gradle.includedBuild('api').task(':clean') + dependsOn gradle.includedBuild('service').task(':clean') + dependsOn gradle.includedBuild('component-test').task(':clean') +} + task licenseFormat { group 'all' dependsOn gradle.includedBuild('api').task(':licenseFormat') diff --git a/component-test/build.gradle b/component-test/build.gradle index 95954e4..84f5516 100644 --- a/component-test/build.gradle +++ b/component-test/build.gradle @@ -33,9 +33,16 @@ plugins { id "com.github.hierynomus.license" version "0.13.1" id("org.nosphere.apache.rat") version "0.3.1" id "com.jfrog.artifactory" version "4.9.5" + id "org.springframework.boot" version "1.4.3.RELEASE" + id 'maven-publish' + id 'java' } apply from: '../shared.gradle' +bootRepackage { + enabled = false +} + dependencies { compile( [group: 'org.apache.fineract.cn.cheques', name: 'api', version: project.version], diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 400f155..29cec40 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 71e5108..4de3557 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jul 25 13:05:05 CEST 2017 +#Mon Sep 30 20:21:32 EEST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip diff --git a/service/build.gradle b/service/build.gradle index 5320f21..5c8a2be 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -19,28 +19,25 @@ buildscript { ext { springBootVersion = '1.4.1.RELEASE' } - repositories { jcenter() } - - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") - } } plugins { id "com.github.hierynomus.license" version "0.13.1" id("org.nosphere.apache.rat") version "0.3.1" id "com.jfrog.artifactory" version "4.9.5" + id "org.springframework.boot" version "1.4.3.RELEASE" + id 'maven-publish' + id 'java' + id 'idea' } apply from: '../shared.gradle' -apply plugin: 'spring-boot' - -springBoot { - executable = true +bootRepackage { + enabled = true classifier = 'boot' } @@ -62,11 +59,15 @@ dependencies { [group: 'org.apache.fineract.cn', name: 'postgresql', version: versions.frameworkpostgresql], [group: 'org.apache.fineract.cn', name: 'command', version: versions.frameworkcommand], [group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator], - [group: 'org.threeten', name: 'threeten-extra', version: '1.2'] + [group: 'org.threeten', name: 'threeten-extra', version: '1.2'], + [group: 'io.netty', name: 'netty-all', version: '4.1.39.Final'], + [group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.39.Final'] ) } -publishToMavenLocal.dependsOn bootRepackage +tasks.withType(PublishToMavenLocal) { task -> + task.dependsOn 'bootRepackage' +} publishing { publications { @@ -78,7 +79,7 @@ publishing { } bootService(MavenPublication) { // "boot" jar - artifact("$buildDir/libs/$project.name-$version-boot.jar") + artifact(file("$buildDir/libs/$project.name-$project.version-${bootRepackage.classifier}.jar")) groupId project.group artifactId("$project.name-boot") version project.findProperty('externalVersion') ?: project.version diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml index 3c3d6ef..d3dda73 100644 --- a/service/src/main/resources/application.yml +++ b/service/src/main/resources/application.yml @@ -35,7 +35,7 @@ eureka: defaultZone: http://localhost:8761/eureka/ server: - port: 8081 + port: 2030 contextPath: /cheques/v1 cassandra: diff --git a/shared.gradle b/shared.gradle index 93c5914..96307a2 100644 --- a/shared.gradle +++ b/shared.gradle @@ -34,11 +34,6 @@ ext.versions = [ validator : '5.3.0.Final' ] -apply plugin: 'java' -apply plugin: 'idea' -apply plugin: 'maven-publish' -apply plugin: 'io.spring.dependency-management' - tasks.withType(JavaCompile) { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 @@ -75,7 +70,7 @@ dependencies { } jar { - from sourceSets.main.allSource + from sourceSets.main.java duplicatesStrategy = DuplicatesStrategy.EXCLUDE } diff --git a/travis.sh b/travis.sh index 03a75ee..d54330d 100755 --- a/travis.sh +++ b/travis.sh @@ -36,6 +36,12 @@ function build_pullrequest() { ./gradlew publishToMavenLocal rat || EXIT_STATUS=$? } +# Builds Forked (non-apache) Repository +function build_fork() { + echo -e "Building branch $TRAVIS_BRANCH of fork $TRAVIS_REPO_SLUG. Won't publish anything to Artifactory." + ./gradlew publishToMavenLocal rat || EXIT_STATUS=$? +} + # For other branches we need to add branch name as prefix function build_otherbranch() { echo -e "Building a snapshot out of branch [$TRAVIS_BRANCH] and publishing it with prefix '${TRAVIS_BRANCH}-SNAPSHOT'" @@ -49,17 +55,19 @@ function build_tag() { } +echo -e "TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG" echo -e "TRAVIS_BRANCH=$TRAVIS_BRANCH" echo -e "TRAVIS_TAG=$TRAVIS_TAG" echo -e "TRAVIS_COMMIT=${TRAVIS_COMMIT::7}" echo -e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST" -# Build Logic -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then +if [[ $TRAVIS_REPO_SLUG != apache* ]]; then + build_fork +elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then build_pullrequest -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ] ; then +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]; then build_otherbranch -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ] ; then +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]; then build_snapshot elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then build_tag
