Permalink
Browse files

GEODE-5604 Update gradle syntax to comply with 5.0 (#2350)

* Fix subproject names for gradle 5.0
** stop using '/' and use preferred ':' character for nested projects
* Update performance profiling plug-in to be Gradle 5.0 compliant
* Fix input/output warnings on geode-old-versions
* Don't use custom configuration in geode-modules-assembly
* All test configurations inherit annotationProcessor from mainSourceSet
* Using strict maven-publish plugin

Co-authored-by: Dick Cavender <dcavender@pivotal.io>
Co-authored-by: Jacob Barrett <jbarrett@pivotal.io>
Co-authored-by: Patrick Rhomberg <prhomberg@pivotal.io>
Co-authored-by: Robert Houghton <rhoughton@pivotal.io>
  • Loading branch information...
4 people committed Aug 28, 2018
1 parent 7b6f5fa commit b3cf86b7f8b0e27abe9ffc4cdb0fd18b7df0c3e2
@@ -28,7 +28,7 @@ buildscript {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2'
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.10.0"
classpath "me.champeau.gradle:jmh-gradle-plugin:0.3.1"
classpath "me.champeau.gradle:jmh-gradle-plugin:0.4.7"
classpath "com.pedjak.gradle.plugins:dockerized-test:0.5.6.2-SNAPSHOT"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath "com.netflix.nebula:nebula-project-plugin:4.0.1"
@@ -76,13 +76,13 @@ if (name == 'geode') {
// utilities.gradle MUST be read before publish.gradle for reasons
apply from: "${scriptDir}/utilities.gradle"
apply from: "${scriptDir}/java.gradle"
apply from: "${scriptDir}/ide.gradle"
apply from: "${scriptDir}/dependency-resolution.gradle"
apply from: "${scriptDir}/test.gradle"
apply from: "${scriptDir}/test-by-category.gradle"
apply from: "${scriptDir}/publish.gradle"
apply from: "${scriptDir}/code-analysis.gradle"
apply from: "${scriptDir}/sonar.gradle"
apply from: "${scriptDir}/ide.gradle"
apply from: "${scriptDir}/rat.gradle"
apply from: "${scriptDir}/docker.gradle"
apply from: "${scriptDir}/spotless.gradle"
@@ -21,7 +21,13 @@ repositories {
}
dependencies {
compile group: 'org.apache.geode', name: 'geode-junit', version: '1.3.0'
compile (group: 'org.apache.geode', name: 'geode-junit', version: '1.3.0') {
exclude group: 'org.apache.logging.log4j'
}
compile group: 'junit', name: 'junit', version: '4.12'
compile files("${System.getProperty('java.home')}/../lib/tools.jar")
}
testAnnotationProcessor this.project
}
@@ -19,7 +19,6 @@ import org.apache.tools.ant.filters.ReplaceTokens
configurations {
slf4jDeps
moduleDistOutputs
}
dependencies {
@@ -51,9 +50,9 @@ def configureTcServerAssembly = {
// All client-server files
into('geode-cs/lib') {
from getJarArtifact(':extensions/geode-modules')
from getJarArtifact(':extensions/geode-modules-tomcat7')
from getJarArtifact(':extensions/geode-modules-tomcat8')
from getJarArtifact(':extensions:geode-modules')
from getJarArtifact(':extensions:geode-modules-tomcat7')
from getJarArtifact(':extensions:geode-modules-tomcat8')
from configurations.slf4jDeps
}
into('geode-cs/bin') {
@@ -84,9 +83,9 @@ def configureTcServerAssembly = {
}
// All peer-to-peer files
into('geode-p2p/lib') {
from getJarArtifact(':extensions/geode-modules')
from getJarArtifact(':extensions/geode-modules-tomcat7')
from getJarArtifact(':extensions/geode-modules-tomcat8')
from getJarArtifact(':extensions:geode-modules')
from getJarArtifact(':extensions:geode-modules-tomcat7')
from getJarArtifact(':extensions:geode-modules-tomcat8')
from configurations.slf4jDeps
}
into('geode-p2p/bin') {
@@ -147,15 +146,15 @@ def configureTcServer30Assembly = {
}
}
task distTomcat(type: Zip, dependsOn: [':extensions/geode-modules:jar', ':extensions/geode-modules-tomcat7:jar', ':extensions/geode-modules-tomcat8:jar']) {
task distTomcat(type: Zip, dependsOn: [':extensions:geode-modules:jar', ':extensions:geode-modules-tomcat7:jar', ':extensions:geode-modules-tomcat8:jar']) {
baseName = moduleBaseName
classifier = "Tomcat"
// All client-server files
into('lib') {
from getJarArtifact(':extensions/geode-modules')
from getJarArtifact(':extensions/geode-modules-tomcat7')
from getJarArtifact(':extensions/geode-modules-tomcat8')
from getJarArtifact(':extensions:geode-modules')
from getJarArtifact(':extensions:geode-modules-tomcat7')
from getJarArtifact(':extensions:geode-modules-tomcat8')
from configurations.slf4jDeps
}
into('bin') {
@@ -171,14 +170,14 @@ task distTomcat(type: Zip, dependsOn: [':extensions/geode-modules:jar', ':extens
}
}
task distAppServer(type: Zip, dependsOn: [':extensions/geode-modules-session:jar', ':extensions/geode-modules-tomcat7:jar', ':extensions/geode-modules-tomcat8:jar']) {
task distAppServer(type: Zip, dependsOn: [':extensions:geode-modules-session:jar', ':extensions:geode-modules-session-internal:jar', ':extensions:geode-modules-tomcat7:jar', ':extensions:geode-modules-tomcat8:jar']) {
baseName = moduleBaseName
classifier = "AppServer"
into('lib') {
from getJarArtifact(':extensions/geode-modules-session')
from getJarArtifact(':extensions/geode-modules-session-internal')
from getJarArtifact(':extensions/geode-modules')
from getJarArtifact(':extensions:geode-modules-session')
from getJarArtifact(':extensions:geode-modules-session-internal')
from getJarArtifact(':extensions:geode-modules')
from configurations.slf4jDeps
}
@@ -204,22 +203,15 @@ task distAppServer(type: Zip, dependsOn: [':extensions/geode-modules-session:jar
}
}
task distTcServer(type: Zip, dependsOn: [':extensions/geode-modules:assemble', ':extensions/geode-modules-tomcat7:assemble', ':extensions/geode-modules-tomcat8:assemble'] ) {
task distTcServer(type: Zip, dependsOn: [':extensions:geode-modules:assemble', ':extensions:geode-modules-tomcat7:assemble', ':extensions:geode-modules-tomcat8:assemble'] ) {
configure(configureTcServerAssembly)
}
task distTcServer30(type: Zip, dependsOn: [':extensions/geode-modules:assemble', ':extensions/geode-modules-tomcat7:assemble', ':extensions/geode-modules-tomcat8:assemble']) {
task distTcServer30(type: Zip, dependsOn: [':extensions:geode-modules:assemble', ':extensions:geode-modules-tomcat7:assemble', ':extensions:geode-modules-tomcat8:assemble']) {
configure(configureTcServerAssembly)
configure(configureTcServer30Assembly)
}
dependencies {
moduleDistOutputs distTcServer.outputs.files
moduleDistOutputs distTcServer30.outputs.files
moduleDistOutputs distAppServer.outputs.files
moduleDistOutputs distTomcat.outputs.files
}
task dist(type: Task, dependsOn: ['distTcServer', 'distTcServer30', 'distTomcat', 'distAppServer'])
build.dependsOn dist
@@ -16,7 +16,7 @@
*/
dependencies {
compile project(':extensions/geode-modules')
compile project(':extensions:geode-modules')
compile project(':geode-core')
}
@@ -18,7 +18,7 @@
evaluationDependsOn(":geode-core")
dependencies {
compile project(':extensions/geode-modules-session-internal')
compile project(':extensions:geode-modules-session-internal')
compile project(':geode-core')
integrationTestCompile project(":geode-dunit")
@@ -22,7 +22,7 @@ dependencies {
exclude module: 'tribes'
}
compile(project(':extensions/geode-modules')) {
compile(project(':extensions:geode-modules')) {
// Remove everything related to Tomcat 6.x
exclude group: 'org.apache.tomcat'
}
@@ -18,7 +18,7 @@
evaluationDependsOn(":geode-core")
dependencies {
compile(project(':extensions/geode-modules')) {
compile(project(':extensions:geode-modules')) {
// Remove everything related to Tomcat 6.x
exclude group: 'org.apache.tomcat'
}
@@ -33,7 +33,7 @@ dependencies {
compile 'org.apache.tomcat:tomcat-juli:' + project.'tomcat7.version'
integrationTestCompile project(":geode-dunit")
integrationTestCompile project(":extensions/geode-modules-test")
integrationTestCompile project(":extensions:geode-modules-test")
integrationTestRuntime 'javax.annotation:jsr250-api:' + project.'javax.jsr250-api.version'
integrationTestRuntime 'javax.ejb:ejb-api:' + project.'javax.ejb-api.version'
@@ -18,7 +18,7 @@
evaluationDependsOn(":geode-core")
dependencies {
compile(project(':extensions/geode-modules')) {
compile(project(':extensions:geode-modules')) {
exclude group: 'org.apache.tomcat'
}
@@ -32,7 +32,7 @@ dependencies {
compile 'org.apache.tomcat:tomcat-juli:' + project.'tomcat8.version'
compile 'javax.servlet:javax.servlet-api:' + '3.1.0'
distributedTestCompile project(":extensions/geode-modules-test")
distributedTestCompile project(":extensions:geode-modules-test")
eclipse.classpath.file {
whenMerged { classpath ->
@@ -30,7 +30,7 @@ dependencies {
testCompile 'org.apache.bcel:bcel:' + project.'bcel.version'
integrationTestCompile project(":geode-dunit")
integrationTestCompile project(":extensions/geode-modules-test")
integrationTestCompile project(":extensions:geode-modules-test")
integrationTestRuntime 'org.apache.tomcat:coyote:' + project.'tomcat6.version'
}
@@ -29,7 +29,7 @@ extraArchive {
publishing {
publications {
maven {
maven(MavenPublication) {
artifactId = 'apache-geode'
artifacts = []
@@ -101,16 +101,16 @@ dependencies {
integrationTestCompile project(":geode-junit")
integrationTestCompile project(":geode-dunit")
integrationTestCompile project(":geode-pulse")
integrationTestCompile project(':geode-assembly/geode-assembly-test')
integrationTestCompile project(':geode-assembly:geode-assembly-test')
integrationTestCompile 'org.apache.httpcomponents:httpclient:' + project.'httpclient.version'
distributedTestCompile project(':geode-core')
distributedTestCompile project(':extensions/session-testing-war')
distributedTestCompile project(':geode-assembly/geode-assembly-test')
distributedTestCompile project(':extensions:session-testing-war')
distributedTestCompile project(':geode-assembly:geode-assembly-test')
distributedTestCompile 'org.apache.httpcomponents:httpclient:' + project.'httpclient.version'
distributedTestRuntime (project(':extensions/geode-modules-session-internal')) {
distributedTestRuntime (project(':extensions:geode-modules-session-internal')) {
exclude group: 'org.apache.tomcat'
}
distributedTestRuntime group: 'org.codehaus.cargo', name: 'cargo-core-uberjar', version: '1.6.3'
@@ -123,8 +123,8 @@ dependencies {
uiTestCompile project(':geode-core')
uiTestCompile project(":geode-dunit")
uiTestCompile project(":geode-pulse")
uiTestCompile project(":geode-pulse/geode-pulse-test")
uiTestCompile project(':geode-assembly/geode-assembly-test')
uiTestCompile project(":geode-pulse:geode-pulse-test")
uiTestCompile project(':geode-assembly:geode-assembly-test')
uiTestCompile 'org.seleniumhq.selenium:selenium-api:' + project.'selenium.version'
uiTestCompile 'org.seleniumhq.selenium:selenium-remote-driver:' + project.'selenium.version'
uiTestCompile 'org.seleniumhq.selenium:selenium-support:' + project.'selenium.version'
@@ -135,11 +135,11 @@ dependencies {
upgradeTestCompile project(':geode-core')
upgradeTestCompile project(":geode-dunit")
upgradeTestCompile project(':geode-assembly/geode-assembly-test')
upgradeTestCompile project(':geode-assembly:geode-assembly-test')
upgradeTestRuntime group: 'org.codehaus.cargo', name: 'cargo-core-uberjar', version: '1.6.3'
upgradeTestRuntime 'org.apache.httpcomponents:httpclient:' + project.'httpclient.version'
upgradeTestRuntime project(':extensions/session-testing-war')
upgradeTestRuntime project(':extensions:session-testing-war')
gfshDependencies ('org.springframework:spring-web:' + project.'springframework.version'){
@@ -444,7 +444,10 @@ distributions {
}
into ('tools/Modules') {
from (project(':extensions/geode-modules-assembly').configurations.moduleDistOutputs.files)
from {project(':extensions:geode-modules-assembly').distTcServer}
from {project(':extensions:geode-modules-assembly').distTcServer30}
from {project(':extensions:geode-modules-assembly').distTomcat}
from {project(':extensions:geode-modules-assembly').distAppServer}
}
}
}
@@ -470,10 +473,10 @@ repeatTest dependOnInstalledProduct
// Make build final task to generate all test and product resources
build.dependsOn installDist
installDist.dependsOn ':extensions/geode-modules-assembly:dist'
distributedTest.dependsOn ':extensions/session-testing-war:war'
installDist.dependsOn ':extensions:geode-modules-assembly:dist'
distributedTest.dependsOn ':extensions:session-testing-war:war'
distributedTest.dependsOn ':geode-old-versions:build'
upgradeTest.dependsOn ':extensions/session-testing-war:war'
upgradeTest.dependsOn ':extensions:session-testing-war:war'
upgradeTest.dependsOn ':geode-old-versions:build'
/**Print the names of all jar files in a fileTree */
@@ -20,7 +20,7 @@ dependencies {
compileOnly project(':geode-core')
compileOnly project(':geode-pulse')
compileOnly project(':extensions/geode-modules-test')
compileOnly project(':extensions:geode-modules-test')
compileOnly group: 'org.codehaus.cargo', name: 'cargo-core-uberjar', version: '1.6.3'
compileOnly 'org.assertj:assertj-core:' + project.'assertj-core.version'
@@ -44,4 +44,4 @@ dependencies {
acceptanceTestRuntime group: 'org.postgresql', name: 'postgresql', version: '42.2.2'
}
integrationTest.forkEvery 0
integrationTest.forkEvery 0
@@ -140,6 +140,9 @@ dependencies {
compile project(':geode-json')
jcaAnnotationProcessor 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version'
jcaCompile sourceSets.main.output
@@ -224,7 +227,9 @@ task createVersionPropertiesFile {
}
// onlyIf takes precedence, but we should generate the file whenever the revision is specified.
outputs.upToDateWhen { false }
outputs.file propertiesFile
outputs.files {
propertiesFile
}
doLast {
def props = [
@@ -23,6 +23,7 @@ dependencies {
integrationTestCompile project(":geode-dunit")
upgradeTestCompile (project(":geode-dunit")) {
exclude module: 'geode-core'
}
@@ -26,18 +26,18 @@ dependencies {
runtimeOnly 'org.apache.lucene:lucene-analyzers-phonetic:' + project.'lucene.version'
testCompile project(':geode-junit')
testCompile project(':geode-lucene/geode-lucene-test')
testCompile project(':geode-lucene:geode-lucene-test')
testCompile 'org.apache.lucene:lucene-test-framework:' + project.'lucene.version'
testCompile 'com.pholser:junit-quickcheck-generators:' + project.'junit-quickcheck.version'
integrationTestCompile project(":geode-dunit")
integrationTestCompile project(':geode-lucene/geode-lucene-test')
integrationTestCompile project(':geode-lucene:geode-lucene-test')
integrationTestCompile 'org.apache.lucene:lucene-analyzers-phonetic:' + project.'lucene.version'
integrationTestCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version'
distributedTestCompile project(':geode-lucene/geode-lucene-test')
distributedTestCompile project(':geode-lucene:geode-lucene-test')
distributedTestCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version'
@@ -47,7 +47,7 @@ dependencies {
performanceTestCompile project(":geode-junit")
performanceTestCompile project(':geode-lucene/geode-lucene-test')
performanceTestCompile project(':geode-lucene:geode-lucene-test')
}
//The lucene integration tests don't have any issues that requiring forking
@@ -16,5 +16,5 @@
*/
dependencies {
compile project(':geode-core')
compile project(':geode-core')
}
@@ -83,11 +83,11 @@ def addOldVersion(def source, def geodeVersion, def downloadInstall) {
project.ext.installs.setProperty(source, "${buildDir}/apache-geode-${geodeVersion}")
task("downloadAndUnzipFile${geodeVersion}") {
inputs.file {
inputs.files {
configurations."${source}OldInstall"
}
outputs.file("${buildDir}/apache-geode-${geodeVersion}")
outputs.dir("${buildDir}/apache-geode-${geodeVersion}")
doLast {
copy {
from zipTree(configurations."${source}OldInstall".singleFile)
Oops, something went wrong.

0 comments on commit b3cf86b

Please sign in to comment.