Skip to content
Permalink
Browse files
Merge pull request #18 from aasaru/gradle_4.10.3
FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks, ...
  • Loading branch information
aasaru committed Oct 9, 2019
2 parents 77d203c + 0fc38b8 commit 65f600100cfb761c0b49b6dc68cdf5cbc2e67ca5
Showing 12 changed files with 70 additions and 40 deletions.
@@ -1,7 +1,9 @@
# Apache Fineract CN Portfolio [![Build Status](https://api.travis-ci.com/apache/fineract-cn-portfolio.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-portfolio)
# Apache Fineract CN Portfolio [![Build Status](https://api.travis-ci.com/apache/fineract-cn-portfolio.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-portfolio) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/apache/fineract-cn-portfolio)](https://hub.docker.com/r/apache/fineract-cn-portfolio/builds)

This project provides product and case management for Fineract CN. Products are described and "instantiated"
for customers as cases.
[Read more](https://cwiki.apache.org/confluence/display/FINERACT/Fineract+CN+Project+Structure#FineractCNProjectStructure-portfolio).


## Abstract
Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.
@@ -21,16 +21,19 @@ buildscript {
}

dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
classpath 'io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.10.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}

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'
@@ -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')
@@ -25,23 +25,28 @@ buildscript {
}

dependencies {
classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
}
}

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: 'spring-boot'
apply plugin: 'org.asciidoctor.convert'


bootRepackage {
enabled = false
}

dependencies {
compile(
[group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka-server'],
BIN +1.92 KB (100%) gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
@@ -1,6 +1,5 @@
#Fri Mar 17 13:27:55 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
@@ -155,7 +155,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
@@ -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("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'
}

@@ -61,15 +58,18 @@ dependencies {
[group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
[group: 'org.apache.fineract.cn', name: 'async', version: versions.frameworkasync],
[group: 'org.apache.fineract.cn', name: 'cassandra', version: versions.frameworkcassandra],
[group: 'org.apache.fineract.cn', name: 'postgresql', version: versions.frameworkmariadb],
[group: 'org.apache.fineract.cn', name: 'postgresql', version: '0.1.0-BUILD-SNAPSHOT'],
[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: 'net.jodah', name: 'expiringmap', version: versions.expiringmap],
[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 {
@@ -81,7 +81,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
@@ -42,7 +42,7 @@ spring:
enabled: false
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/playground
url: jdbc:postgresql://localhost:5432/seshat
username: postgres
password: postgres

@@ -54,7 +54,7 @@ eureka:
preferIpAddress: true

server:
port: 8081
port: 2026
contextPath: /portfolio/v1/*

cassandra:
@@ -90,4 +90,4 @@ async:
threadName: async-processor-

flyway:
enabled: false
enabled: false
@@ -0,0 +1,10 @@
_____ _ _ ____ _ _
| ___(_)_ __ ___ _ __ __ _ ___| |_ / ___| \ | |
| |_ | | '_ \ / _ \ '__/ _` |/ __| __|____| | | \| |
| _| | | | | | __/ | | (_| | (__| ||_____| |___| |\ |
|_| |_|_| |_|\___|_| \__,_|\___|\__| \____|_| \_|
____ _ __ _ _
| _ \ ___ _ __| |_ / _| ___ | (_) ___
| |_) / _ \| '__| __| |_ / _ \| | |/ _ \
| __/ (_) | | | |_| _| (_) | | | (_) |
|_| \___/|_| \__|_| \___/|_|_|\___/
@@ -22,7 +22,7 @@ ext.versions = [
frameworkanubis : '0.1.0-BUILD-SNAPSHOT',
frameworkapi : '0.1.0-BUILD-SNAPSHOT',
frameworklang : '0.1.0-BUILD-SNAPSHOT',
frameworkmariadb : '0.1.0-BUILD-SNAPSHOT',
frameworkpostgresql : '0.1.0-BUILD-SNAPSHOT',
frameworkcassandra : '0.1.0-BUILD-SNAPSHOT',
frameworkcommand : '0.1.0-BUILD-SNAPSHOT',
frameworktest : '0.1.0-BUILD-SNAPSHOT',
@@ -35,11 +35,6 @@ ext.versions = [
expiringmap : '0.5.8'
]

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
@@ -76,7 +71,7 @@ dependencies {
}

jar {
from sourceSets.main.allSource
from sourceSets.main.java
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

@@ -111,6 +106,8 @@ license {
rat {
// List of exclude directives, defaults to ['**/.gradle/**']
excludes = [
"**/*.log",
"**/banner.txt",
"**/.dockerignore/**",
"**/.idea/**",
"**/.gradle/**",
@@ -120,5 +117,4 @@ rat {
"gradlew.bat",
"README.md"
]
plainOutput = true
}
@@ -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

0 comments on commit 65f6001

Please sign in to comment.