Skip to content

Commit

Permalink
Merge pull request OpenLiberty#3 from tjwatson/spring-boot-merge-master
Browse files Browse the repository at this point in the history
Spring boot merge master
  • Loading branch information
tjwatson authored Jan 25, 2018
2 parents e024ebc + 3f0514a commit d698f48
Show file tree
Hide file tree
Showing 979 changed files with 92,013 additions and 7,002 deletions.
27 changes: 23 additions & 4 deletions dev/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@
* Depends on bnd_* values from gradle.properties.
*/

/* Initialize rootProject properties */
ext {
cnf = rootProject.project(bnd_cnf)
buildImage = project(':build.image')
}

/* Configure the subprojects */
subprojects {
def bndProject = bndWorkspace.getProject(name)
if (bndProject != null) {
plugins.apply 'biz.aQute.bnd'
}

/* For Java 9 builds, set the --release compiler flag to keep bootclasspath in sync */
//compileJava {
tasks.withType(JavaCompile) {
doFirst {
if(JavaVersion.current().isJava9Compatible()) {
Expand All @@ -39,13 +37,34 @@ subprojects {
}
}
}

apply from: cnf.file('gradle/scripts/repos.gradle')
apply from: cnf.file('gradle/scripts/publish.gradle')
apply from: cnf.file('gradle/scripts/tasks.gradle')

if (bndis('fat.project')) {
apply from: cnf.file('gradle/scripts/fat.gradle')
}

// Make the release task depend on assemble so that invoking 'release' or 'releaseNeeded'
// will publish jar updates to the local build.image/wlp image
release.dependsOn assemble
release.dependsOn publish
}

task testResults {
dependsOn subprojects.test

doLast {
generatedProps.setProperty('tests.total.failed', failedTestCountTotal.toString())
generatedProps.setProperty('tests.total.successful', successfulTestCountTotal.toString())

File propsFile = new File('generated.properties')
generatedProps.store(propsFile.newWriter(), null)
}
}

task wrapper(type: Wrapper) {
jarFile = rootProject.file('.gradle-wrapper/gradle-wrapper.jar')
}

apply from: 'cnf/gradle/scripts/tasks.gradle'
6 changes: 3 additions & 3 deletions dev/cnf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ task copyMavenLibs(type: Copy) {
void deleteRecursive(File file) {
if (file.isDirectory()) {
for (File entry : file.listFiles()) {
deleteRecursive(entry);
deleteRecursive(entry)
}
}
file.delete();
file.delete()
}

task cleanRepos(type: Delete) {
Expand All @@ -72,6 +72,7 @@ task initialize {

import org.apache.tools.ant.filters.ReplaceTokens
import org.apache.tools.ant.DirectoryScanner
import groovy.util.XmlSlurper

DirectoryScanner.removeDefaultExclude("**/.gitignore")
DirectoryScanner.removeDefaultExclude("**/.gitattributes")
Expand All @@ -97,7 +98,6 @@ task everythingElseHasBeenReleased {
task createGradleBootstrap {
dependsOn everythingElseHasBeenReleased
doLast {

println 'Generating gradle bootstrap'

String depsList = ""
Expand Down
12 changes: 6 additions & 6 deletions dev/cnf/gradle/scripts/fat.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,13 @@ task runfat(type: Exec) {
// For example './gradlew buildfat' (to build all FATs) or './gradlew build.example_fat:buildandrun'
def buildFatEnabled = false;
if(gradle.startParameter.getCurrentDir().getAbsolutePath().contains("_fat")) {
buildFatEnabled = true;
buildFatEnabled = true;
} else {
gradle.startParameter.taskNames.each {
if(it.contains("fat")) {
buildFatEnabled = true;
}
}
gradle.startParameter.taskNames.each {
if(it.contains("fat")) {
buildFatEnabled = true;
}
}
}

assemble {
Expand Down
23 changes: 23 additions & 0 deletions dev/cnf/gradle/scripts/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins.apply 'maven-publish'

publishing {
repositories {
if (isRemotePublishing) {
maven {
if(project.version.endsWith('-SNAPSHOT')) {
url ('https://' + generatedProps.getProperty('artifactory.upload.server') + '/artifactory/wasliberty-open-liberty' + matrixParams)
} else {
url ('https://' + generatedProps.getProperty('artifactory.upload.server') + '/artifactory/wasliberty-open-liberty' + matrixParams)
}
credentials {
username generatedProps.getProperty("artifactory.upload.user")
password generatedProps.getProperty("artifactory.upload.token")
}
}
} else {
maven {
url uri(cnf.file("release"))
}
}
}
}
19 changes: 19 additions & 0 deletions dev/cnf/gradle/scripts/repos.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Properties props = new Properties()
rootProject.file('generated.properties').withInputStream { props.load(it) }

repositories {
if ((props.getProperty("artifactory.download.server") != null) && !props.getProperty('artifactory.force.external.repo')) {
maven {
credentials {
username props.getProperty("artifactory.download.user")
password props.getProperty("artifactory.download.token")
}
url ("https://" + props.getProperty("artifactory.download.server") + "/artifactory/wasliberty-open-liberty")
}
} else {
mavenCentral()
maven {
url ("http://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/wasliberty-open-liberty/")
}
}
}
Loading

0 comments on commit d698f48

Please sign in to comment.