Skip to content
Permalink
Browse files
Merge pull request #32 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 b8eda50 + 244b3ef commit fba985fb48112ef89f7b30c1a15e5be7e3eb521c
Showing 6 changed files with 34 additions and 15 deletions.
@@ -22,7 +22,7 @@ buildscript {
}

dependencies {
classpath ("io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE")
classpath ("io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE")
}

dependencies {
@@ -34,6 +34,10 @@ 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'
}

group 'org.apache.fineract.cn'
@@ -63,11 +67,8 @@ ext.versions = [
validator : '5.3.0.Final'
]

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'spring-boot'
apply plugin: 'maven-publish'


tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -185,6 +186,7 @@ rat {
"target/**",
"gradlew",
"gradlew.bat",
"README.md"
"README.md",
"src/main/resources/banner.txt"
]
}
BIN +1.92 KB (100%) gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
@@ -1,6 +1,5 @@
#Mon Jun 12 22:30:04 CEST 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-all.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 " "
}
@@ -0,0 +1,10 @@
_____ _ _ ____ _ _
| ___(_)_ __ ___ _ __ __ _ ___| |_ / ___| \ | |
| |_ | | '_ \ / _ \ '__/ _` |/ __| __|____| | | \| |
| _| | | | | | __/ | | (_| | (__| ||_____| |___| |\ |
|_| |_|_| |_|\___|_| \__,_|\___|\__| \____|_| \_|
____ ____
| _ \ ___ _ __ ___ ___ / ___| ___ _ ____ _____ _ __
| | | |/ _ \ '_ ` _ \ / _ \ \___ \ / _ \ '__\ \ / / _ \ '__|
| |_| | __/ | | | | | (_) | ___) | __/ | \ V / __/ |
|____/ \___|_| |_| |_|\___/ |____/ \___|_| \_/ \___|_|
@@ -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 fba985f

Please sign in to comment.