Skip to content
Permalink
Browse files
FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks
  • Loading branch information
Juhan Aasaru authored and Juhan Aasaru committed Sep 30, 2019
1 parent d708bac commit 7631c31a8ade86e34a4f7e38136eb87b69679df8
Showing 8 changed files with 37 additions and 16 deletions.
@@ -22,14 +22,17 @@ buildscript {
}

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 "com.jfrog.artifactory" version "4.9.5"
id "io.spring.dependency-management" version "1.0.8.RELEASE"
id 'maven-publish'
id 'java'
}


@@ -53,6 +53,14 @@ task artifactoryPublish {
dependsOn gradle.includedBuild('test').task(':artifactoryPublish')
}

task clean {
group 'all'
dependsOn gradle.includedBuild('api').task(':clean')
dependsOn gradle.includedBuild('library').task(':clean')
dependsOn gradle.includedBuild('test').task(':clean')
dependsOn gradle.includedBuild('component-test').task(':clean')
}

task licenseFormat {
group 'all'
dependsOn gradle.includedBuild('api').task(':licenseFormat')
@@ -19,24 +19,27 @@ 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'

bootRepackage {
enabled = false
}

dependencies {
compile(
[group: 'org.springframework.cloud', name: 'spring-cloud-starter-config'],
BIN +1.92 KB (100%) gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
@@ -1,6 +1,5 @@
#Tue Mar 14 12:33:07 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 " "
}
@@ -74,7 +74,7 @@ dependencies {
}

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

@@ -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 7631c31

Please sign in to comment.