Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8 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 fb30580 + 6aca205 commit 3ae622c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
9 changes: 3 additions & 6 deletions build.gradle
Expand Up @@ -25,6 +25,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 'maven-publish'
id 'idea'
id 'java'
}

group 'org.apache.fineract.cn'
Expand All @@ -37,12 +40,6 @@ ext.versions = [
frameworklang : '0.1.0-BUILD-SNAPSHOT'
]

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'license'

tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Tue Mar 14 09:53:15 CET 2017
#Tue Oct 01 09:13:44 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-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
16 changes: 12 additions & 4 deletions travis.sh
Expand Up @@ -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'"
Expand All @@ -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
Expand Down

0 comments on commit 3ae622c

Please sign in to comment.