Merge pull request #13 from aasaru/gradle_4.10.3
FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks ...
diff --git a/README.md b/README.md
index eed37e6..44e0173 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
-# Apache Fineract CN Payroll [![Build Status](https://api.travis-ci.com/apache/fineract-cn-payroll.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-payroll)
+# Apache Fineract CN Payroll [![Build Status](https://api.travis-ci.com/apache/fineract-cn-payroll.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-payroll) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/apache/fineract-cn-payroll)](https://hub.docker.com/r/apache/fineract-cn-payroll/builds)
This project provides functionality to configure payroll allocations and distribute payroll payments for customers.
+[Read more](https://cwiki.apache.org/confluence/display/FINERACT/Fineract+CN+Project+Structure#FineractCNProjectStructure-payroll).
+
## Versioning
The version numbers follow the [Semantic Versioning](http://semver.org/) scheme.
diff --git a/api/build.gradle b/api/build.gradle
index a11f487..d010481 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -21,14 +21,17 @@
}
dependencies {
- classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
+ classpath 'io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE'
}
}
plugins {
id "com.github.hierynomus.license" version "0.13.1"
- id("org.nosphere.apache.rat") version "0.3.1"
+ id("org.nosphere.apache.rat") version "0.5.2"
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 @@
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 ec66397..9ebbbf3 100644
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@ -25,19 +25,25 @@
}
dependencies {
- classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
}
}
plugins {
id "com.github.hierynomus.license" version "0.13.1"
- id("org.nosphere.apache.rat") version "0.3.1"
+ id("org.nosphere.apache.rat") version "0.5.2"
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'
apply plugin: 'org.asciidoctor.convert'
+bootRepackage {
+ enabled = false
+}
+
dependencies {
compile(
[group: 'org.apache.fineract.cn.payroll', name: 'api', version: project.version],
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 400f155..19559ff 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 61d11e0..67ff678 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Sep 14 14:33:32 CEST 2017
+#Mon Sep 30 20:16:49 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 b314f83..25f6626 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -19,28 +19,25 @@
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("org.nosphere.apache.rat") version "0.5.2"
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'
}
@@ -59,12 +56,15 @@
[group: 'org.apache.fineract.cn', name: 'cassandra', version: versions.frameworkcassandra],
[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.hibernate', name: 'hibernate-validator', version: versions.validator],
+ [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 {
service(MavenPublication) {
@@ -75,7 +75,7 @@
}
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 b7193af..3e13da4 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -23,11 +23,6 @@
enabled: false
config:
enabled: false
- datasource:
- driver-class-name: org.postgresql.Driver
- url: jdbc:postgresql://localhost:5432/playground
- username: postgres
- password: postgres
eureka:
client:
@@ -35,7 +30,7 @@
defaultZone: http://localhost:8761/eureka/
server:
- port: 8081
+ port: 2031
contextPath: /payroll/v1/*
cassandra:
diff --git a/service/src/main/resources/banner.txt b/service/src/main/resources/banner.txt
new file mode 100644
index 0000000..75537b1
--- /dev/null
+++ b/service/src/main/resources/banner.txt
@@ -0,0 +1,11 @@
+ _____ _ _ ____ _ _
+ | ___(_)_ __ ___ _ __ __ _ ___| |_ / ___| \ | |
+ | |_ | | '_ \ / _ \ '__/ _` |/ __| __|____| | | \| |
+ | _| | | | | | __/ | | (_| | (__| ||_____| |___| |\ |
+ |_| |_|_| |_|\___|_| \__,_|\___|\__| \____|_| \_|
+ ____ _ _
+ | _ \ __ _ _ _ _ __ ___ | | |
+ | |_) / _` | | | | '__/ _ \| | |
+ | __/ (_| | |_| | | | (_) | | |
+ |_| \__,_|\__, |_| \___/|_|_|
+ |___/
diff --git a/shared.gradle b/shared.gradle
index eb3fd8a..964762e 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -32,11 +32,6 @@
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
@@ -73,7 +68,7 @@
}
jar {
- from sourceSets.main.allSource
+ from sourceSets.main.java
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
@@ -107,6 +102,8 @@
rat {
// List of exclude directives, defaults to ['**/.gradle/**']
excludes = [
+ "**/*.log",
+ "**/banner.txt",
"**/.idea/**",
"**/.gradle/**",
"**/gradle/**",
@@ -116,5 +113,4 @@
"README.md",
"**/.dockerignore/**"
]
- plainOutput = true
-}
\ No newline at end of file
+}
diff --git a/travis.sh b/travis.sh
index 03a75ee..d54330d 100755
--- a/travis.sh
+++ b/travis.sh
@@ -36,6 +36,12 @@
./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 @@
}
+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