From 89105618d7877cce23ffa7456ba97aec621c1160 Mon Sep 17 00:00:00 2001 From: Robert Houghton Date: Tue, 16 Oct 2018 19:12:00 -0700 Subject: [PATCH] GEODE-5879 Enforces consistent syntax in gradle dependency declaration (#2611) Always use a parentesis around the thing being depended on. Do not space pad between configuration and parenthesis before dependency Prefer single quote around the package names Co-authored-by: Robert Houghton Co-authored-by: Patrick Rhomberg --- .../build.gradle | 6 +- extensions/geode-modules-session/build.gradle | 14 +- extensions/geode-modules-test/build.gradle | 6 +- extensions/geode-modules-tomcat7/build.gradle | 20 +-- extensions/geode-modules-tomcat8/build.gradle | 14 +- extensions/geode-modules/build.gradle | 18 +-- extensions/session-testing-war/build.gradle | 5 +- geode-assembly/build.gradle | 124 +++++++++--------- .../geode-assembly-test/build.gradle | 22 ++-- geode-common/build.gradle | 2 +- geode-concurrency-test/build.gradle | 4 +- geode-connectors/build.gradle | 24 ++-- geode-core/build.gradle | 120 ++++++++--------- geode-cq/build.gradle | 14 +- geode-dunit/build.gradle | 28 ++-- geode-experimental-driver/build.gradle | 21 ++- geode-junit/build.gradle | 30 ++--- geode-lucene/build.gradle | 36 ++--- geode-lucene/geode-lucene-test/build.gradle | 8 +- geode-old-client-support/build.gradle | 2 +- geode-protobuf-messages/build.gradle | 2 +- geode-protobuf/build.gradle | 23 ++-- .../geode-protobuf-test/build.gradle | 11 +- geode-pulse/build.gradle | 70 +++++----- geode-pulse/geode-pulse-test/build.gradle | 13 +- geode-rebalancer/build.gradle | 12 +- geode-wan/build.gradle | 16 +-- geode-web-api/build.gradle | 40 +++--- geode-web/build.gradle | 32 ++--- gradle/spotless.gradle | 52 ++++++-- 30 files changed, 397 insertions(+), 392 deletions(-) diff --git a/extensions/geode-modules-session-internal/build.gradle b/extensions/geode-modules-session-internal/build.gradle index e1dcc1c35ecf..0f357ed36ecc 100644 --- a/extensions/geode-modules-session-internal/build.gradle +++ b/extensions/geode-modules-session-internal/build.gradle @@ -16,12 +16,12 @@ */ dependencies { - compile project(':extensions:geode-modules') - compile project(':geode-core') + compile(project(':extensions:geode-modules')) + compile(project(':geode-core')) } jar { baseName = 'geode-modules-session-internal' } -disableMavenPublishing() \ No newline at end of file +disableMavenPublishing() diff --git a/extensions/geode-modules-session/build.gradle b/extensions/geode-modules-session/build.gradle index 40c68d16474a..59f3c72d34ac 100644 --- a/extensions/geode-modules-session/build.gradle +++ b/extensions/geode-modules-session/build.gradle @@ -18,25 +18,25 @@ evaluationDependsOn(":geode-core") dependencies { - compile project(':extensions:geode-modules-session-internal') - compile project(':geode-core') + compile(project(':extensions:geode-modules-session-internal')) + compile(project(':geode-core')) - integrationTestCompile project(":geode-dunit") - integrationTestCompile ('org.httpunit:httpunit:' + project.'httpunit.version') { + integrationTestCompile(project(':geode-dunit')) + integrationTestCompile('org.httpunit:httpunit:' + project.'httpunit.version') { exclude group: 'javax.servlet' // this version of httpunit contains very outdated xercesImpl exclude group: 'xerces' } integrationTestCompile(group: 'org.eclipse.jetty', name: 'jetty-http', version: project.'jetty.version', classifier: 'tests') integrationTestCompile(group: 'org.eclipse.jetty', name: 'jetty-servlet', version: project.'jetty.version', classifier: 'tests') - integrationTestCompile 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version' - integrationTestCompile 'org.slf4j:slf4j-api:' + project.'slf4j-api.version' + integrationTestCompile('javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version') + integrationTestCompile('org.slf4j:slf4j-api:' + project.'slf4j-api.version') integrationTestCompile('com.mockrunner:mockrunner-servlet:' + project.'mockrunner.version') { exclude group: 'jboss' exclude group: 'xerces' } - integrationTestRuntime 'xerces:xercesImpl:' + project.'xercesImpl.version' + integrationTestRuntime('xerces:xercesImpl:' + project.'xercesImpl.version') } jar { diff --git a/extensions/geode-modules-test/build.gradle b/extensions/geode-modules-test/build.gradle index 43e91efc1187..8c961f1ee185 100644 --- a/extensions/geode-modules-test/build.gradle +++ b/extensions/geode-modules-test/build.gradle @@ -16,7 +16,7 @@ */ dependencies { - compileOnly ('org.apache.tomcat:catalina-ha:' + project.'tomcat6.version') { + compileOnly('org.apache.tomcat:catalina-ha:' + project.'tomcat6.version') { exclude module: 'annotations-api' exclude module: 'coyote' exclude module: 'tribes' @@ -26,8 +26,8 @@ dependencies { // Remove everything related to Tomcat 6.x exclude group: 'org.apache.tomcat' } - compile project(':geode-junit') - compile ('org.httpunit:httpunit:' + project.'httpunit.version') { + compile(project(':geode-junit')) + compile('org.httpunit:httpunit:' + project.'httpunit.version') { // this version of httpunit contains very outdated xercesImpl exclude group: 'xerces' } diff --git a/extensions/geode-modules-tomcat7/build.gradle b/extensions/geode-modules-tomcat7/build.gradle index d05b639348bc..948a7649d064 100644 --- a/extensions/geode-modules-tomcat7/build.gradle +++ b/extensions/geode-modules-tomcat7/build.gradle @@ -23,23 +23,23 @@ dependencies { exclude group: 'org.apache.tomcat' } - compile ('org.apache.tomcat:tomcat-catalina:' + project.'tomcat7.version') { + compile('org.apache.tomcat:tomcat-catalina:' + project.'tomcat7.version') { exclude module: 'tomcat-annotations-api' exclude module: 'tomcat-servlet-api' } - compile ('org.apache.tomcat:tomcat-coyote:' + project.'tomcat7.version') { + compile('org.apache.tomcat:tomcat-coyote:' + project.'tomcat7.version') { exclude module: 'tomcat-servlet-api' } - compile 'org.apache.tomcat:tomcat-juli:' + project.'tomcat7.version' + compile('org.apache.tomcat:tomcat-juli:' + project.'tomcat7.version') - integrationTestCompile project(":geode-dunit") - integrationTestCompile project(":extensions:geode-modules-test") + integrationTestCompile(project(':geode-dunit')) + 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' - integrationTestRuntime 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version' - integrationTestRuntime 'org.eclipse.persistence:javax.persistence:' + project.'javax.persistence-api.version' - integrationTestRuntime 'xerces:xercesImpl:' + project.'xercesImpl.version' + integrationTestRuntime('javax.annotation:jsr250-api:' + project.'javax.jsr250-api.version') + integrationTestRuntime('javax.ejb:ejb-api:' + project.'javax.ejb-api.version') + integrationTestRuntime('javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version') + integrationTestRuntime('org.eclipse.persistence:javax.persistence:' + project.'javax.persistence-api.version') + integrationTestRuntime('xerces:xercesImpl:' + project.'xercesImpl.version') eclipse.classpath.file { whenMerged { classpath -> diff --git a/extensions/geode-modules-tomcat8/build.gradle b/extensions/geode-modules-tomcat8/build.gradle index 370c7a5739f7..1d0c3d88d148 100644 --- a/extensions/geode-modules-tomcat8/build.gradle +++ b/extensions/geode-modules-tomcat8/build.gradle @@ -22,20 +22,20 @@ dependencies { exclude group: 'org.apache.tomcat' } - compile ('org.apache.tomcat:tomcat-catalina:' + project.'tomcat8.version') { + compile('org.apache.tomcat:tomcat-catalina:' + project.'tomcat8.version') { exclude module: 'tomcat-annotations-api' exclude module: 'tomcat-servlet-api' } - compile ('org.apache.tomcat:tomcat-coyote:' + project.'tomcat8.version') { + compile('org.apache.tomcat:tomcat-coyote:' + project.'tomcat8.version') { exclude module: 'tomcat-servlet-api' } - compile 'org.apache.tomcat:tomcat-juli:' + project.'tomcat8.version' - compile 'javax.servlet:javax.servlet-api:' + '3.1.0' + 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')) - distributedTestRuntime 'xerces:xercesImpl:' + project.'xercesImpl.version' - distributedTestRuntime 'javax.annotation:javax.annotation-api:' + project.'javax-annotation.version' + distributedTestRuntime('xerces:xercesImpl:' + project.'xercesImpl.version') + distributedTestRuntime('javax.annotation:javax.annotation-api:' + project.'javax-annotation.version') eclipse.classpath.file { whenMerged { classpath -> diff --git a/extensions/geode-modules/build.gradle b/extensions/geode-modules/build.gradle index 0ed502451f6f..8fdf0e9ee9fc 100644 --- a/extensions/geode-modules/build.gradle +++ b/extensions/geode-modules/build.gradle @@ -18,22 +18,22 @@ evaluationDependsOn(":geode-core") dependencies { - compile project(':geode-core') - compile 'org.slf4j:slf4j-api:' + project.'slf4j-api.version' - compile ('org.apache.tomcat:catalina-ha:' + project.'tomcat6.version') { + compile(project(':geode-core')) + compile('org.slf4j:slf4j-api:' + project.'slf4j-api.version') + compile('org.apache.tomcat:catalina-ha:' + project.'tomcat6.version') { exclude module: 'annotations-api' exclude module: 'coyote' exclude module: 'tribes' } - compile 'org.apache.tomcat:juli:' + project.'tomcat6.version' + compile('org.apache.tomcat:juli:' + project.'tomcat6.version') - testCompile 'org.apache.bcel:bcel:' + project.'bcel.version' + testCompile('org.apache.bcel:bcel:' + project.'bcel.version') - integrationTestCompile project(":geode-dunit") - integrationTestCompile project(":extensions:geode-modules-test") + integrationTestCompile(project(':geode-dunit')) + integrationTestCompile(project(':extensions:geode-modules-test')) - integrationTestRuntime 'org.apache.tomcat:coyote:' + project.'tomcat6.version' - integrationTestRuntime 'xerces:xercesImpl:' + project.'xercesImpl.version' + integrationTestRuntime('org.apache.tomcat:coyote:' + project.'tomcat6.version') + integrationTestRuntime('xerces:xercesImpl:' + project.'xercesImpl.version') } disableMavenPublishing() diff --git a/extensions/session-testing-war/build.gradle b/extensions/session-testing-war/build.gradle index 47b8bd3b69bf..e87be20e5739 100644 --- a/extensions/session-testing-war/build.gradle +++ b/extensions/session-testing-war/build.gradle @@ -17,8 +17,9 @@ apply plugin: 'war' dependencies { - compileOnly 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version' - testCompile 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version' + compileOnly('javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version') + + testCompile('javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version') } war { diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle index 79e0e5bdd323..28c87fd034b0 100755 --- a/geode-assembly/build.gradle +++ b/geode-assembly/build.gradle @@ -131,54 +131,54 @@ dependencies { archives project(':geode-rebalancer') - testCompile project(':geode-core') - testCompile project(':geode-junit') + testCompile(project(':geode-core')) + testCompile(project(':geode-junit')) - integrationTestCompile project(':geode-core') - integrationTestCompile project(":geode-junit") - integrationTestCompile project(":geode-dunit") - integrationTestCompile project(":geode-pulse") - integrationTestCompile project(':geode-assembly:geode-assembly-test') - integrationTestCompile 'org.apache.httpcomponents:httpclient:' + project.'httpclient.version' - integrationTestCompile 'javax.annotation:javax.annotation-api:' + project.'javax-annotation.version' + integrationTestCompile(project(':geode-core')) + integrationTestCompile(project(':geode-junit')) + integrationTestCompile(project(':geode-dunit')) + integrationTestCompile(project(':geode-pulse')) + integrationTestCompile(project(':geode-assembly:geode-assembly-test')) + integrationTestCompile('org.apache.httpcomponents:httpclient:' + project.'httpclient.version') + integrationTestCompile('javax.annotation:javax.annotation-api:' + project.'javax-annotation.version') - distributedTestCompile project(':geode-core') - distributedTestCompile project(':extensions:session-testing-war') - distributedTestCompile project(':geode-assembly:geode-assembly-test') - distributedTestCompile '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('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' + distributedTestRuntime(group: 'org.codehaus.cargo', name: 'cargo-core-uberjar', version: '1.6.3') - acceptanceTestCompile project(':geode-core') - acceptanceTestCompile project(":geode-dunit") + acceptanceTestCompile(project(':geode-core')) + acceptanceTestCompile(project(':geode-dunit')) - 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 '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' + 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('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') - uiTestRuntime project(":geode-core") - uiTestRuntime 'org.seleniumhq.selenium:selenium-chrome-driver:' + project.'selenium.version' + uiTestRuntime(project(':geode-core')) + uiTestRuntime('org.seleniumhq.selenium:selenium-chrome-driver:' + project.'selenium.version') - upgradeTestCompile project(':geode-core') - upgradeTestCompile project(":geode-dunit") - upgradeTestCompile project(':geode-assembly:geode-assembly-test') + upgradeTestCompile(project(':geode-core')) + upgradeTestCompile(project(':geode-dunit')) + 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(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 files({ downloadWebServers } ) //Web servers used for session module testing @@ -416,37 +416,37 @@ distributions { } into ('lib') { - from project(":geode-common").configurations.runtimeClasspath - from project(":geode-common").configurations.archives.allArtifacts.files - from project(":geode-json").configurations.runtimeClasspath - from project(":geode-json").configurations.archives.allArtifacts.files - from project(":geode-wan").configurations.runtimeClasspath - from project(":geode-wan").configurations.archives.allArtifacts.files - from project(":geode-cq").configurations.runtimeClasspath - from project(":geode-cq").configurations.archives.allArtifacts.files - from project(":geode-core").configurations.runtimeClasspath - from project(":geode-core").configurations.archives.allArtifacts.files - from project(":geode-lucene").configurations.runtimeClasspath - from project(":geode-lucene").configurations.archives.allArtifacts.files - from project(":geode-connectors").configurations.runtimeClasspath - from project(":geode-connectors").configurations.archives.allArtifacts.files - from project(":geode-old-client-support").configurations.runtimeClasspath - from project(":geode-old-client-support").configurations.archives.allArtifacts.files - from project(":geode-protobuf").configurations.runtimeClasspath - from project(":geode-protobuf").configurations.archives.allArtifacts.files - from project(":geode-protobuf-messages").configurations.runtimeClasspath - from project(":geode-protobuf-messages").configurations.archives.allArtifacts.files - from project(":geode-rebalancer").configurations.runtimeClasspath - from project(":geode-rebalancer").configurations.archives.allArtifacts.files + from project(':geode-common').configurations.runtimeClasspath + from project(':geode-common').configurations.archives.allArtifacts.files + from project(':geode-json').configurations.runtimeClasspath + from project(':geode-json').configurations.archives.allArtifacts.files + from project(':geode-wan').configurations.runtimeClasspath + from project(':geode-wan').configurations.archives.allArtifacts.files + from project(':geode-cq').configurations.runtimeClasspath + from project(':geode-cq').configurations.archives.allArtifacts.files + from project(':geode-core').configurations.runtimeClasspath + from project(':geode-core').configurations.archives.allArtifacts.files + from project(':geode-lucene').configurations.runtimeClasspath + from project(':geode-lucene').configurations.archives.allArtifacts.files + from project(':geode-connectors').configurations.runtimeClasspath + from project(':geode-connectors').configurations.archives.allArtifacts.files + from project(':geode-old-client-support').configurations.runtimeClasspath + from project(':geode-old-client-support').configurations.archives.allArtifacts.files + from project(':geode-protobuf').configurations.runtimeClasspath + from project(':geode-protobuf').configurations.archives.allArtifacts.files + from project(':geode-protobuf-messages').configurations.runtimeClasspath + from project(':geode-protobuf-messages').configurations.archives.allArtifacts.files + from project(':geode-rebalancer').configurations.runtimeClasspath + from project(':geode-rebalancer').configurations.archives.allArtifacts.files from configurations.bundled from configurations.gfshDependencies //These tasks are included as closures (wrapped in {}) because gradle may evaluate //this CopySpec before it evaluates the geode-core build file. - from { project(":geode-core").webJar } - from { project(":geode-core").raJar } - from { project(":geode-core").jcaJar } + from { project(':geode-core').webJar } + from { project(':geode-core').raJar } + from { project(':geode-core').jcaJar } // dependency jars from depsJar @@ -454,16 +454,16 @@ distributions { } into ('tools/Extensions') { - from (project(":geode-web").configurations.archives.allArtifacts.files) { + from (project(':geode-web').configurations.archives.allArtifacts.files) { exclude '*.jar' } - from (project(":geode-web-api").configurations.archives.allArtifacts.files) { + from (project(':geode-web-api').configurations.archives.allArtifacts.files) { exclude '*.jar' } } into('tools/ClientProtocol') { - from {project(":geode-protobuf-messages").zip.outputs.files} + from {project(':geode-protobuf-messages').zip.outputs.files} } into ('javadoc') { @@ -471,7 +471,7 @@ distributions { } into ('tools/Pulse') { - from (project(":geode-pulse").configurations.archives.allArtifacts.files) + from (project(':geode-pulse').configurations.archives.allArtifacts.files) } into ('tools/Modules') { diff --git a/geode-assembly/geode-assembly-test/build.gradle b/geode-assembly/geode-assembly-test/build.gradle index 81116875f648..d70c0769df06 100755 --- a/geode-assembly/geode-assembly-test/build.gradle +++ b/geode-assembly/geode-assembly-test/build.gradle @@ -17,18 +17,16 @@ dependencies { - - compileOnly project(':geode-core') - compileOnly project(':geode-pulse') - 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' - compileOnly 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version' - compileOnly 'commons-io:commons-io:' + project.'commons-io.version' - compileOnly 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version' - compileOnly 'org.apache.httpcomponents:httpclient:' + project.'httpclient.version' - compileOnly 'junit:junit:' + project.'junit.version' + compileOnly(project(':extensions:geode-modules-test')) + compileOnly(project(':geode-core')) + compileOnly(project(':geode-pulse')) + compileOnly('com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version') + compileOnly('commons-io:commons-io:' + project.'commons-io.version') + compileOnly('junit:junit:' + project.'junit.version') + compileOnly('org.apache.httpcomponents:httpclient:' + project.'httpclient.version') + compileOnly('org.apache.logging.log4j:log4j-api:' + project.'log4j.version') + compileOnly('org.assertj:assertj-core:' + project.'assertj-core.version') + compileOnly(group: 'org.codehaus.cargo', name: 'cargo-core-uberjar', version: '1.6.3') } disableMavenPublishing() diff --git a/geode-common/build.gradle b/geode-common/build.gradle index 45a2aad85742..03e2d171420c 100755 --- a/geode-common/build.gradle +++ b/geode-common/build.gradle @@ -16,5 +16,5 @@ */ dependencies { - testCompile project(':geode-junit') + testCompile(project(':geode-junit')) } diff --git a/geode-concurrency-test/build.gradle b/geode-concurrency-test/build.gradle index 14bdca5a8918..f767a2968357 100644 --- a/geode-concurrency-test/build.gradle +++ b/geode-concurrency-test/build.gradle @@ -15,6 +15,6 @@ * limitations under the License. */ dependencies { - compile 'junit:junit:' + project.'junit.version' - compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version' + compile('junit:junit:' + project.'junit.version') + compile('org.apache.logging.log4j:log4j-api:' + project.'log4j.version') } diff --git a/geode-connectors/build.gradle b/geode-connectors/build.gradle index 088080998fa4..b99ba40ff551 100644 --- a/geode-connectors/build.gradle +++ b/geode-connectors/build.gradle @@ -25,23 +25,19 @@ repositories { } dependencies { - compile project(':geode-core') - compile project(':geode-common') - compile group: 'com.zaxxer', name: 'HikariCP', version: project.'HikariCP.version' + compile(project(':geode-common')) + compile(project(':geode-core')) + testCompile(project(':geode-junit')) + integrationTestCompile(project(':geode-dunit')) + acceptanceTestCompile(project(':geode-dunit')) + compile(group: 'com.zaxxer', name: 'HikariCP', version: project.'HikariCP.version') - testCompile project(':geode-junit') + acceptanceTestCompile(group: 'com.palantir.docker.compose', name: 'docker-compose-rule-junit4', version: '0.31.1') + acceptanceTestCompile(group: 'mysql', name: 'mysql-connector-java', version: '5.1.46') - - integrationTestCompile project(":geode-dunit") - - - acceptanceTestCompile project(":geode-dunit") - acceptanceTestCompile group: 'mysql', name: 'mysql-connector-java', version: '5.1.46' - acceptanceTestCompile group: 'com.palantir.docker.compose', name: 'docker-compose-rule-junit4', version: '0.31.1' - - acceptanceTestRuntime group: 'org.apache.derby', name: 'derby', version: project.'derby.version' - acceptanceTestRuntime group: 'org.postgresql', name: 'postgresql', version: '42.2.2' + acceptanceTestRuntime(group: 'org.apache.derby', name: 'derby', version: project.'derby.version') + acceptanceTestRuntime(group: 'org.postgresql', name: 'postgresql', version: '42.2.2') } integrationTest.forkEvery 0 diff --git a/geode-core/build.gradle b/geode-core/build.gradle index 246500e2e2ab..44e8b73a4a3e 100755 --- a/geode-core/build.gradle +++ b/geode-core/build.gradle @@ -143,20 +143,20 @@ dependencies { // External compileOnly files("${System.getProperty('java.home')}/../lib/tools.jar") - compile 'com.github.stephenc.findbugs:findbugs-annotations:' + project.'stephenc-findbugs.version' - compile 'org.jgroups:jgroups:' + project.'jgroups.version' - compile 'antlr:antlr:' + project.'antlr.version' - compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version' - compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version' - compile 'commons-io:commons-io:' + project.'commons-io.version' - compile 'commons-validator:commons-validator:' + project.'commons-validator.version' - compile 'commons-digester:commons-digester:' + project.'commons-digester.version' - compile 'javax.activation:activation:' + project.'javax-activation.version' - compile 'javax.xml.bind:jaxb-api:' + project.'jaxb.version' - compile 'com.sun.xml.bind:jaxb-core:' + project.'jaxb.version' - compile 'com.sun.xml.bind:jaxb-impl:' + project.'jaxb.version' - - compile 'commons-lang:commons-lang:' + project.'commons-lang.version' + compile('com.github.stephenc.findbugs:findbugs-annotations:' + project.'stephenc-findbugs.version') + compile('org.jgroups:jgroups:' + project.'jgroups.version') + compile('antlr:antlr:' + project.'antlr.version') + compile('com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version') + compile('com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version') + compile('commons-io:commons-io:' + project.'commons-io.version') + compile('commons-validator:commons-validator:' + project.'commons-validator.version') + compile('commons-digester:commons-digester:' + project.'commons-digester.version') + compile('javax.activation:activation:' + project.'javax-activation.version') + compile('javax.xml.bind:jaxb-api:' + project.'jaxb.version') + compile('com.sun.xml.bind:jaxb-core:' + project.'jaxb.version') + compile('com.sun.xml.bind:jaxb-impl:' + project.'jaxb.version') + + compile('commons-lang:commons-lang:' + project.'commons-lang.version') compile('commons-modeler:commons-modeler:' + project.'commons-modeler.version') { exclude module: 'commons-digester' exclude module: 'commons-logging-api' @@ -167,11 +167,11 @@ dependencies { compile('io.netty:netty-all:' + project.'netty-all.version') { ext.optional = true } - compile 'it.unimi.dsi:fastutil:' + project.'fastutil.version' + compile('it.unimi.dsi:fastutil:' + project.'fastutil.version') compile('javax.mail:javax.mail-api:' + project.'javax.mail-api.version') { ext.optional = true; } - compile 'javax.resource:javax.resource-api:' + project.'javax.resource-api.version' + compile('javax.resource:javax.resource-api:' + project.'javax.resource-api.version') compile('mx4j:mx4j:' + project.'mx4j.version') { ext.optional = true; } @@ -185,22 +185,22 @@ dependencies { compile('net.sf.jopt-simple:jopt-simple:' + project.'jopt-simple.version') - compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version' - compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version' + compile('org.apache.logging.log4j:log4j-api:' + project.'log4j.version') + compile('org.apache.logging.log4j:log4j-core:' + project.'log4j.version') - runtimeOnly ('org.fusesource.jansi:jansi:' + project.'jansi.version') { + runtimeOnly('org.fusesource.jansi:jansi:' + project.'jansi.version') { ext.optional = true } - runtimeOnly 'org.slf4j:slf4j-api:' + project.'slf4j-api.version' + runtimeOnly('org.slf4j:slf4j-api:' + project.'slf4j-api.version') - runtimeOnly ('org.apache.logging.log4j:log4j-slf4j-impl:' + project.'log4j.version') { + runtimeOnly('org.apache.logging.log4j:log4j-slf4j-impl:' + project.'log4j.version') { exclude module: 'slf4j-api' ext.optional = true } - runtimeOnly ('org.apache.logging.log4j:log4j-jcl:' + project.'log4j.version') { + runtimeOnly('org.apache.logging.log4j:log4j-jcl:' + project.'log4j.version') { ext.optional = true } - runtimeOnly ('org.apache.logging.log4j:log4j-jul:' + project.'log4j.version') { + runtimeOnly('org.apache.logging.log4j:log4j-jul:' + project.'log4j.version') { ext.optional = true } compile('org.eclipse.jetty:jetty-webapp:' + project.'jetty.version') { @@ -232,70 +232,70 @@ dependencies { ext.optional = true } - compile 'org.apache.shiro:shiro-core:' + project.'shiro.version' + compile('org.apache.shiro:shiro-core:' + project.'shiro.version') - compile 'io.github.classgraph:classgraph:' + project.'classgraph.version' + compile('io.github.classgraph:classgraph:' + project.'classgraph.version') - compile 'com.healthmarketscience.rmiio:rmiio:' + project.'rmiio.version' + compile('com.healthmarketscience.rmiio:rmiio:' + project.'rmiio.version') - compile project(':geode-common') - compile project(':geode-json') + compile(project(':geode-common')) + compile(project(':geode-json')) jcaAnnotationProcessor 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version' - jcaCompile sourceSets.main.output + jcaCompile(sourceSets.main.output) - testCompile project(':geode-junit') - testCompile project(':geode-concurrency-test') - testCompile 'org.apache.bcel:bcel:' + project.'bcel.version' - testCompile 'org.mockito:mockito-core:' + project.'mockito-core.version' - testCompile 'org.springframework:spring-test:' + project.'springframework.version' - testCompile 'com.pholser:junit-quickcheck-core:' + project.'junit-quickcheck.version' + testCompile(project(':geode-junit')) + testCompile(project(':geode-concurrency-test')) + testCompile('org.apache.bcel:bcel:' + project.'bcel.version') + testCompile('org.mockito:mockito-core:' + project.'mockito-core.version') + testCompile('org.springframework:spring-test:' + project.'springframework.version') + testCompile('com.pholser:junit-quickcheck-core:' + project.'junit-quickcheck.version') testCompile files("${System.getProperty('java.home')}/../lib/tools.jar") - testRuntime 'commons-collections:commons-collections:' + project.'commons-collections.version' - testRuntime 'commons-configuration:commons-configuration:' + project.'commons-configuration.version' - testRuntime 'commons-io:commons-io:' + project.'commons-io.version' - testRuntime 'commons-validator:commons-validator:' + project.'commons-validator.version' - testRuntime 'com.pholser:junit-quickcheck-generators:' + project.'junit-quickcheck.version' + testRuntime('commons-collections:commons-collections:' + project.'commons-collections.version') + testRuntime('commons-configuration:commons-configuration:' + project.'commons-configuration.version') + testRuntime('commons-io:commons-io:' + project.'commons-io.version') + testRuntime('commons-validator:commons-validator:' + project.'commons-validator.version') + testRuntime('com.pholser:junit-quickcheck-generators:' + project.'junit-quickcheck.version') - integrationTestCompile(project(":geode-dunit")) { + integrationTestCompile(project(':geode-dunit')) { exclude module: 'geode-core' } - integrationTestCompile project(':geode-concurrency-test') - integrationTestCompile 'redis.clients:jedis:' + project.'jedis.version' - integrationTestCompile 'org.apache.bcel:bcel:' + project.'bcel.version' - integrationTestCompile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version' + ':tests' - integrationTestCompile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version' + ':test-sources' - integrationTestCompile 'org.springframework:spring-test:' + project.'springframework.version' - integrationTestCompile 'net.spy:spymemcached:' + project.'spymemcached.version' - integrationTestCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version' + integrationTestCompile(project(':geode-concurrency-test')) + integrationTestCompile('redis.clients:jedis:' + project.'jedis.version') + integrationTestCompile('org.apache.bcel:bcel:' + project.'bcel.version') + integrationTestCompile('org.apache.logging.log4j:log4j-core:' + project.'log4j.version' + ':tests') + integrationTestCompile('org.apache.logging.log4j:log4j-core:' + project.'log4j.version' + ':test-sources') + integrationTestCompile('org.springframework:spring-test:' + project.'springframework.version') + integrationTestCompile('net.spy:spymemcached:' + project.'spymemcached.version') + integrationTestCompile('pl.pragmatists:JUnitParams:' + project.'JUnitParams.version') - integrationTestRuntime 'org.apache.derby:derby:' + project.'derby.version' - integrationTestRuntime 'xerces:xercesImpl:' + project.'xercesImpl.version' + integrationTestRuntime('org.apache.derby:derby:' + project.'derby.version') + integrationTestRuntime('xerces:xercesImpl:' + project.'xercesImpl.version') - distributedTestCompile project(":geode-dunit") - distributedTestCompile 'redis.clients:jedis:' + project.'jedis.version' - distributedTestCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version' - distributedTestCompile 'com.jayway.jsonpath:json-path-assert:' + project.'json-path-assert.version' + distributedTestCompile(project(':geode-dunit')) + distributedTestCompile('redis.clients:jedis:' + project.'jedis.version') + distributedTestCompile('pl.pragmatists:JUnitParams:' + project.'JUnitParams.version') + distributedTestCompile('com.jayway.jsonpath:json-path-assert:' + project.'json-path-assert.version') - distributedTestRuntime 'org.apache.derby:derby:' + project.'derby.version' + distributedTestRuntime('org.apache.derby:derby:' + project.'derby.version') - upgradeTestCompile(project(":geode-dunit")) { + upgradeTestCompile(project(':geode-dunit')) { exclude module: 'geode-core' } - performanceTestCompile project(":geode-junit") + performanceTestCompile(project(':geode-junit')) - integrationTestCompile sourceSets.test.output // To be removed by GEODE-5803 - distributedTestCompile sourceSets.integrationTest.output // To be removed by GEODE-5803 + integrationTestCompile(sourceSets.test.output) // To be removed by GEODE-5803 + distributedTestCompile(sourceSets.integrationTest.output) // To be removed by GEODE-5803 } tasks.eclipse.dependsOn(generateGrammarSource) diff --git a/geode-cq/build.gradle b/geode-cq/build.gradle index c4eeaa94c827..01b1d8032904 100644 --- a/geode-cq/build.gradle +++ b/geode-cq/build.gradle @@ -16,15 +16,11 @@ */ dependencies { - compileOnly project(':geode-core') - - testCompile project(':geode-core') - testCompile project(':geode-junit') - - integrationTestCompile project(":geode-dunit") - - - upgradeTestCompile (project(":geode-dunit")) { + compileOnly(project(':geode-core')) + testCompile(project(':geode-core')) + testCompile(project(':geode-junit')) + integrationTestCompile(project(':geode-dunit')) + upgradeTestCompile(project(':geode-dunit')) { exclude module: 'geode-core' } } diff --git a/geode-dunit/build.gradle b/geode-dunit/build.gradle index 7ed3bd576799..acdfaa885b44 100755 --- a/geode-dunit/build.gradle +++ b/geode-dunit/build.gradle @@ -16,18 +16,18 @@ */ dependencies { - compile project(':geode-core') + compile(project(':geode-core')) //compileOnly files("${System.getProperty('java.home')}/../lib/tools.jar") - compile project(':geode-junit') - compile project(':geode-json') + compile(project(':geode-junit')) + compile(project(':geode-json')) - compile 'com.jayway.jsonpath:json-path:' + project.'json-path.version' - compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version' - compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version' - compile 'commons-io:commons-io:' + project.'commons-io.version' - compile 'commons-lang:commons-lang:' + project.'commons-lang.version' - compile ('org.springframework.shell:spring-shell:' + project.'spring-shell.version') { + compile('com.jayway.jsonpath:json-path:' + project.'json-path.version') + compile('org.apache.logging.log4j:log4j-api:' + project.'log4j.version') + compile('org.apache.logging.log4j:log4j-core:' + project.'log4j.version') + compile('commons-io:commons-io:' + project.'commons-io.version') + compile('commons-lang:commons-lang:' + project.'commons-lang.version') + compile('org.springframework.shell:spring-shell:' + project.'spring-shell.version') { exclude module: 'aopalliance' exclude module: 'asm' exclude module: 'cglib' @@ -36,14 +36,14 @@ dependencies { exclude module: 'spring-context-support' ext.optional = true } - compile 'com.google.guava:guava:' + project.'guava.version' - compile ('com.github.stefanbirkner:system-rules:' + project.'system-rules.version') { + compile('com.google.guava:guava:' + project.'guava.version') + compile('com.github.stefanbirkner:system-rules:' + project.'system-rules.version') { exclude module: 'junit-dep' } - compile 'org.assertj:assertj-core:' + project.'assertj-core.version' - compile 'org.mockito:mockito-core:' + project.'mockito-core.version' - compile 'org.awaitility:awaitility:' + project.'awaitility.version' + compile('org.assertj:assertj-core:' + project.'assertj-core.version') + compile('org.mockito:mockito-core:' + project.'mockito-core.version') + compile('org.awaitility:awaitility:' + project.'awaitility.version') compile('junit:junit:' + project.'junit.version') { exclude module: 'hamcrest-core' diff --git a/geode-experimental-driver/build.gradle b/geode-experimental-driver/build.gradle index b2a5e6166d96..c1b81288faa7 100644 --- a/geode-experimental-driver/build.gradle +++ b/geode-experimental-driver/build.gradle @@ -16,17 +16,14 @@ */ dependencies { - compile project(':geode-common') - compile project(':geode-protobuf-messages') - compile 'com.google.protobuf:protobuf-java:' + project.'protobuf-java.version' + compile(project(':geode-common')) + compile(project(':geode-protobuf-messages')) + testCompile(project(':geode-core')) + testCompile(project(':geode-junit')) + testCompile(project(':geode-protobuf')) + integrationTestCompile(project(':geode-core')) + integrationTestCompile(project(':geode-dunit')) + integrationTestCompile(project(':geode-protobuf')) - - testCompile project(':geode-core') - testCompile project(':geode-junit') - testCompile project(':geode-protobuf') - - - integrationTestCompile project(':geode-core') - integrationTestCompile project(":geode-dunit") - integrationTestCompile project(':geode-protobuf') + compile('com.google.protobuf:protobuf-java:' + project.'protobuf-java.version') } diff --git a/geode-junit/build.gradle b/geode-junit/build.gradle index bbb289e5cf17..938525bed81d 100755 --- a/geode-junit/build.gradle +++ b/geode-junit/build.gradle @@ -16,31 +16,31 @@ */ dependencies { - compileOnly project(':geode-core') + compileOnly(project(':geode-core')) - compile ('com.github.stefanbirkner:system-rules:' + project.'system-rules.version') { + compile('com.github.stefanbirkner:system-rules:' + project.'system-rules.version') { exclude module: 'junit-dep' } - compile 'com.jayway.jsonpath:json-path:' + project.'json-path.version' - compile 'org.assertj:assertj-core:' + project.'assertj-core.version' - compile 'commons-io:commons-io:' + project.'commons-io.version' - compile 'commons-lang:commons-lang:' + project.'commons-lang.version' - compile 'com.google.guava:guava:' + project.'guava.version' - compile 'org.mockito:mockito-core:' + project.'mockito-core.version' - compile 'org.awaitility:awaitility:' + project.'awaitility.version' - compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version' - compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version' + compile('com.jayway.jsonpath:json-path:' + project.'json-path.version') + compile('org.assertj:assertj-core:' + project.'assertj-core.version') + compile('commons-io:commons-io:' + project.'commons-io.version') + compile('commons-lang:commons-lang:' + project.'commons-lang.version') + compile('com.google.guava:guava:' + project.'guava.version') + compile('org.mockito:mockito-core:' + project.'mockito-core.version') + compile('org.awaitility:awaitility:' + project.'awaitility.version') + compile('org.apache.logging.log4j:log4j-api:' + project.'log4j.version') + compile('org.apache.logging.log4j:log4j-core:' + project.'log4j.version') compile('junit:junit:' + project.'junit.version') { exclude module: 'hamcrest-core' } - compile 'org.hamcrest:hamcrest-all:' + project.'hamcrest-all.version' - compile ('org.skyscreamer:jsonassert:' + project.'jsonassert.version') { + compile('org.hamcrest:hamcrest-all:' + project.'hamcrest-all.version') + compile('org.skyscreamer:jsonassert:' + project.'jsonassert.version') { exclude module: 'android-json' } - compile 'org.bouncycastle:bcpkix-jdk15on:' + project.'bounty-castle.version' + compile('org.bouncycastle:bcpkix-jdk15on:' + project.'bounty-castle.version') - runtimeOnly project(":geode-old-versions") + runtimeOnly(project(':geode-old-versions')) } test { diff --git a/geode-lucene/build.gradle b/geode-lucene/build.gradle index 55061658104f..10f9923f8fcf 100644 --- a/geode-lucene/build.gradle +++ b/geode-lucene/build.gradle @@ -16,38 +16,38 @@ */ dependencies { - compile project(':geode-core') - compile project(':geode-common') - compile 'org.apache.lucene:lucene-analyzers-common:' + project.'lucene.version' - compile ('org.apache.lucene:lucene-queryparser:' + project.'lucene.version') { + compile(project(':geode-core')) + compile(project(':geode-common')) + compile('org.apache.lucene:lucene-analyzers-common:' + project.'lucene.version') + compile('org.apache.lucene:lucene-queryparser:' + project.'lucene.version') { exclude module: 'lucene-sandbox' } - runtimeOnly 'org.apache.lucene:lucene-analyzers-phonetic:' + project.'lucene.version' + runtimeOnly('org.apache.lucene:lucene-analyzers-phonetic:' + project.'lucene.version') - testCompile project(':geode-junit') - 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' + testCompile(project(':geode-junit')) + 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 'org.apache.lucene:lucene-analyzers-phonetic:' + project.'lucene.version' - integrationTestCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version' + integrationTestCompile(project(':geode-dunit')) + 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 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version' + distributedTestCompile(project(':geode-lucene:geode-lucene-test')) + distributedTestCompile('pl.pragmatists:JUnitParams:' + project.'JUnitParams.version') - upgradeTestCompile (project(":geode-dunit")) { + upgradeTestCompile(project(':geode-dunit')) { exclude module: 'geode-core' } - performanceTestCompile project(":geode-junit") - performanceTestCompile project(':geode-lucene:geode-lucene-test') + performanceTestCompile(project(':geode-junit')) + performanceTestCompile(project(':geode-lucene:geode-lucene-test')) } //The lucene integration tests don't have any issues that requiring forking diff --git a/geode-lucene/geode-lucene-test/build.gradle b/geode-lucene/geode-lucene-test/build.gradle index 4e79b756020d..bec972f19d0c 100755 --- a/geode-lucene/geode-lucene-test/build.gradle +++ b/geode-lucene/geode-lucene-test/build.gradle @@ -17,11 +17,11 @@ dependencies { - compileOnly project(':geode-lucene') + compileOnly(project(':geode-lucene')) - compile 'junit:junit:' + project.'junit.version' - compile 'org.apache.lucene:lucene-test-framework:' + project.'lucene.version' - compile 'org.mockito:mockito-core:' + project.'mockito-core.version' + compile('junit:junit:' + project.'junit.version') + compile('org.apache.lucene:lucene-test-framework:' + project.'lucene.version') + compile('org.mockito:mockito-core:' + project.'mockito-core.version') } disableMavenPublishing() diff --git a/geode-old-client-support/build.gradle b/geode-old-client-support/build.gradle index 4b9100b8fd93..86b495847602 100644 --- a/geode-old-client-support/build.gradle +++ b/geode-old-client-support/build.gradle @@ -16,5 +16,5 @@ */ dependencies { - compile project(':geode-core') + compile(project(':geode-core')) } diff --git a/geode-protobuf-messages/build.gradle b/geode-protobuf-messages/build.gradle index 905b3d9d1beb..be950560bbf8 100644 --- a/geode-protobuf-messages/build.gradle +++ b/geode-protobuf-messages/build.gradle @@ -28,7 +28,7 @@ buildscript { } dependencies { - compile 'com.google.protobuf:protobuf-java:' + project.'protobuf-java.version' + compile('com.google.protobuf:protobuf-java:' + project.'protobuf-java.version') } protobuf { diff --git a/geode-protobuf/build.gradle b/geode-protobuf/build.gradle index c9a031b0c2de..9de7905e45f1 100644 --- a/geode-protobuf/build.gradle +++ b/geode-protobuf/build.gradle @@ -16,19 +16,14 @@ */ dependencies { - compileOnly project(':geode-core') - compile project(':geode-protobuf-messages') - compile 'com.google.protobuf:protobuf-java:' + project.'protobuf-java.version' + compile(project(':geode-protobuf-messages')) + compileOnly(project(':geode-core')) + testCompile(project(':geode-core')) + testCompile(project(':geode-junit')) + testCompile(project(':geode-protobuf:geode-protobuf-test')) + integrationTestCompile(project(':geode-dunit')) + integrationTestCompile(project(':geode-protobuf:geode-protobuf-test')) + distributedTestCompile(project(':geode-protobuf:geode-protobuf-test')) - - testCompile project(':geode-core') - testCompile project(':geode-junit') - testCompile project(":geode-protobuf:geode-protobuf-test") - - - integrationTestCompile project(":geode-dunit") - integrationTestCompile project(":geode-protobuf:geode-protobuf-test") - - - distributedTestCompile project(":geode-protobuf:geode-protobuf-test") + compile('com.google.protobuf:protobuf-java:' + project.'protobuf-java.version') } diff --git a/geode-protobuf/geode-protobuf-test/build.gradle b/geode-protobuf/geode-protobuf-test/build.gradle index dfc4e2f72f36..dbbf0bcfc396 100755 --- a/geode-protobuf/geode-protobuf-test/build.gradle +++ b/geode-protobuf/geode-protobuf-test/build.gradle @@ -17,13 +17,12 @@ dependencies { - compileOnly project(':geode-protobuf') - compileOnly project(':geode-core') - - compile project(':geode-common') - compile 'junit:junit:' + project.'junit.version' - compile 'org.mockito:mockito-core:' + project.'mockito-core.version' + compile(project(':geode-common')) + compileOnly(project(':geode-core')) + compileOnly(project(':geode-protobuf')) + compile('junit:junit:' + project.'junit.version') + compile('org.mockito:mockito-core:' + project.'mockito-core.version') } disableMavenPublishing() diff --git a/geode-pulse/build.gradle b/geode-pulse/build.gradle index ce9262e175cb..9378880b0c9d 100755 --- a/geode-pulse/build.gradle +++ b/geode-pulse/build.gradle @@ -17,72 +17,72 @@ apply plugin: 'war' dependencies { - compile 'org.springframework:spring-beans:' + project.'springframework.version' + compile('org.springframework:spring-beans:' + project.'springframework.version') // Needed to fully use log4j instead of commons-logging. - compile 'org.apache.logging.log4j:log4j-jcl:' + project.'log4j.version' - compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version' - compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version' + compile('org.apache.logging.log4j:log4j-jcl:' + project.'log4j.version') + compile('org.apache.logging.log4j:log4j-api:' + project.'log4j.version') + compile('org.apache.logging.log4j:log4j-core:' + project.'log4j.version') - compile 'commons-beanutils:commons-beanutils:' + project.'commons-beanutils.version' - compile 'commons-collections:commons-collections:' + project.'commons-collections.version' - compile 'commons-digester:commons-digester:' + project.'commons-digester.version' - compile 'commons-lang:commons-lang:' + project.'commons-lang.version' - compile 'org.springframework.ldap:spring-ldap-core:' + project.'spring-ldap-core.version' - runtimeOnly 'org.springframework:spring-expression:' + project.'springframework.version' + compile('commons-beanutils:commons-beanutils:' + project.'commons-beanutils.version') + compile('commons-collections:commons-collections:' + project.'commons-collections.version') + compile('commons-digester:commons-digester:' + project.'commons-digester.version') + compile('commons-lang:commons-lang:' + project.'commons-lang.version') + compile('org.springframework.ldap:spring-ldap-core:' + project.'spring-ldap-core.version') + runtimeOnly('org.springframework:spring-expression:' + project.'springframework.version') // added only to ensure common version with other geode modules - runtimeOnly 'org.slf4j:slf4j-api:' + project.'slf4j-api.version' + runtimeOnly('org.slf4j:slf4j-api:' + project.'slf4j-api.version') - compile ('org.springframework.security:spring-security-config:' + project.'spring-security.version') { + compile('org.springframework.security:spring-security-config:' + project.'spring-security.version') { exclude module: 'aopalliance' exclude module: 'spring-expression' } - compile ('org.springframework.security:spring-security-ldap:' + project.'spring-security.version') { + compile('org.springframework.security:spring-security-ldap:' + project.'spring-security.version') { exclude module: 'aopalliance' exclude module: 'spring-asm' exclude module: 'spring-expression' exclude module: 'spring-jdbc' } - compile ('org.springframework.security:spring-security-web:' + project.'spring-security.version') { + compile('org.springframework.security:spring-security-web:' + project.'spring-security.version') { exclude module: 'aopalliance' exclude module: 'spring-asm' exclude module: 'spring-expression' exclude module: 'spring-jdbc' } - compile ('org.springframework:spring-context:' + project.'springframework.version'); - compile ('org.springframework:spring-web:' + project.'springframework.version'); - runtimeOnly ('org.springframework:spring-webmvc:' + project.'springframework.version') { + compile('org.springframework:spring-context:' + project.'springframework.version'); + compile('org.springframework:spring-web:' + project.'springframework.version'); + runtimeOnly('org.springframework:spring-webmvc:' + project.'springframework.version') { exclude module: 'aopalliance' exclude module: 'aspectjweaver' } - compile 'org.springframework:spring-tx:' + project.'spring-tx.version' - compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version' - compile 'com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version' - compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version' + compile('org.springframework:spring-tx:' + project.'spring-tx.version') + compile('com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version') + compile('com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version') + compile('com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version') - providedCompile 'commons-logging:commons-logging:' + project.'commons-logging.version' + providedCompile('commons-logging:commons-logging:' + project.'commons-logging.version') - compileOnly 'org.mortbay.jetty:servlet-api:' + project.'mortbay-jetty-servlet-api.version' + compileOnly('org.mortbay.jetty:servlet-api:' + project.'mortbay-jetty-servlet-api.version') - testCompile project(':geode-junit') - testCompile project(':geode-core') - testCompile 'org.springframework:spring-test:' + project.'springframework.version' + testCompile(project(':geode-junit')) + testCompile(project(':geode-core')) + testCompile('org.springframework:spring-test:' + project.'springframework.version') - integrationTestCompile project(':geode-junit') - integrationTestCompile project(':geode-core') - integrationTestCompile project(':geode-pulse:geode-pulse-test') - integrationTestCompile 'org.springframework:spring-test:' + project.'springframework.version' + integrationTestCompile(project(':geode-junit')) + integrationTestCompile(project(':geode-core')) + integrationTestCompile(project(':geode-pulse:geode-pulse-test')) + integrationTestCompile('org.springframework:spring-test:' + project.'springframework.version') - uiTestCompile project(':geode-junit') - uiTestCompile project(':geode-json') - uiTestCompile project(':geode-pulse:geode-pulse-test') - uiTestCompile 'org.seleniumhq.selenium:selenium-remote-driver:' + project.'selenium.version' + uiTestCompile(project(':geode-junit')) + uiTestCompile(project(':geode-json')) + uiTestCompile(project(':geode-pulse:geode-pulse-test')) + uiTestCompile('org.seleniumhq.selenium:selenium-remote-driver:' + project.'selenium.version') - uiTestRuntime project(':geode-core') + uiTestRuntime(project(':geode-core')) } def generatedResources = "$buildDir/generated-resources/main" diff --git a/geode-pulse/geode-pulse-test/build.gradle b/geode-pulse/geode-pulse-test/build.gradle index 1d32d2e64550..176302f280c9 100755 --- a/geode-pulse/geode-pulse-test/build.gradle +++ b/geode-pulse/geode-pulse-test/build.gradle @@ -17,14 +17,13 @@ dependencies { + compileOnly(project(':geode-core')) + compileOnly(project(':geode-junit')) + compileOnly(project(':geode-pulse')) - compileOnly project(':geode-core') - compileOnly project(':geode-junit') - compileOnly project(':geode-pulse') - - compile 'org.seleniumhq.selenium:selenium-api:' + project.'selenium.version' - compile 'org.seleniumhq.selenium:selenium-chrome-driver:' + project.'selenium.version' - compile 'org.seleniumhq.selenium:selenium-support:' + project.'selenium.version' + compile('org.seleniumhq.selenium:selenium-api:' + project.'selenium.version') + compile('org.seleniumhq.selenium:selenium-chrome-driver:' + project.'selenium.version') + compile('org.seleniumhq.selenium:selenium-support:' + project.'selenium.version') } disableMavenPublishing() diff --git a/geode-rebalancer/build.gradle b/geode-rebalancer/build.gradle index 3e8cd77d2e50..0acbdbf7ee1b 100644 --- a/geode-rebalancer/build.gradle +++ b/geode-rebalancer/build.gradle @@ -16,18 +16,18 @@ */ dependencies { - compileOnly project(':geode-common') - compileOnly project(':geode-core') + compileOnly(project(':geode-common')) + compileOnly(project(':geode-core')) - compile ('org.springframework:spring-context:' + project.'springframework.version') { + compile('org.springframework:spring-context:' + project.'springframework.version') { exclude module: 'spring-beans' exclude module: 'spring-expression' exclude module: 'spring-aop' } - testCompile project(':geode-core') + testCompile(project(':geode-core')) - integrationTestCompile 'org.awaitility:awaitility:' + project.'awaitility.version' + integrationTestCompile('org.awaitility:awaitility:' + project.'awaitility.version') // Only needed for category Flaky by Gradle - integrationTestRuntime project(':geode-junit') + integrationTestRuntime(project(':geode-junit')) } diff --git a/geode-wan/build.gradle b/geode-wan/build.gradle index c7e20a394f97..841643c4b815 100644 --- a/geode-wan/build.gradle +++ b/geode-wan/build.gradle @@ -16,16 +16,12 @@ */ dependencies { - compileOnly project(':geode-core') - - testCompile project(':geode-core') - testCompile project(':geode-junit') - - integrationTestCompile project(":geode-junit") - - distributedTestCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version' - - upgradeTestCompile (project(":geode-dunit")) { + compileOnly(project(':geode-core')) + testCompile(project(':geode-core')) + testCompile(project(':geode-junit')) + integrationTestCompile(project(':geode-junit')) + upgradeTestCompile(project(':geode-dunit')) { exclude module: 'geode-core' } + distributedTestCompile('pl.pragmatists:JUnitParams:' + project.'JUnitParams.version') } diff --git a/geode-web-api/build.gradle b/geode-web-api/build.gradle index 6ad3e3bebc44..0369e530e743 100755 --- a/geode-web-api/build.gradle +++ b/geode-web-api/build.gradle @@ -19,30 +19,30 @@ apply plugin: 'war' dependencies { - compileOnly project(':geode-core') + compileOnly(project(':geode-core')) - compileOnly 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version' + compileOnly('javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version') - compile 'commons-lang:commons-lang:' + project.'commons-lang.version' + compile('commons-lang:commons-lang:' + project.'commons-lang.version') compile('commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version') { exclude module: 'commons-io' } - compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version' - compile 'com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version' - compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version' - compile 'com.fasterxml.jackson.module:jackson-module-scala_2.10:' + project.'jackson-module-scala_2.10.version' + compile('com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version') + compile('com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version') + compile('com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version') + compile('com.fasterxml.jackson.module:jackson-module-scala_2.10:' + project.'jackson-module-scala_2.10.version') compile('io.springfox:springfox-swagger2:' + project.'springfox.version') { exclude module: 'slf4j-api' } compile('io.springfox:springfox-swagger-ui:' + project.'springfox.version') { exclude module: 'slf4j-api' } - compile 'org.springframework:spring-beans:' + project.'springframework.version' - compile 'org.springframework.security:spring-security-core:' + project.'spring-security.version' - compile 'org.springframework.security:spring-security-web:' + project.'spring-security.version' - compile 'org.springframework.security:spring-security-config:' + project.'spring-security.version' - compile 'org.springframework:spring-web:' + project.'springframework.version' - compile 'org.springframework:spring-webmvc:' + project.'springframework.version' + compile('org.springframework:spring-beans:' + project.'springframework.version') + compile('org.springframework.security:spring-security-core:' + project.'spring-security.version') + compile('org.springframework.security:spring-security-web:' + project.'spring-security.version') + compile('org.springframework.security:spring-security-config:' + project.'spring-security.version') + compile('org.springframework:spring-web:' + project.'springframework.version') + compile('org.springframework:spring-webmvc:' + project.'springframework.version') compile('org.springframework.hateoas:spring-hateoas:' + project.'spring-hateoas.version') { exclude module: 'aopalliance' exclude module: 'commons-logging' @@ -61,15 +61,15 @@ dependencies { } - testCompile project(':geode-junit') - testCompile project(':geode-core') - testCompile 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version' + testCompile(project(':geode-junit')) + testCompile(project(':geode-core')) + testCompile('javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version') - integrationTestCompile 'org.springframework:spring-test:' + project.'springframework.version' - integrationTestCompile 'org.springframework.security:spring-security-test:' + project.'spring-security.version' + integrationTestCompile('org.springframework:spring-test:' + project.'springframework.version') + integrationTestCompile('org.springframework.security:spring-security-test:' + project.'spring-security.version') - integrationTestCompile project(":geode-junit") - integrationTestCompile project(":geode-dunit") + integrationTestCompile(project(':geode-junit')) + integrationTestCompile(project(':geode-dunit')) } sourceSets { diff --git a/geode-web/build.gradle b/geode-web/build.gradle index 84003a3e33c4..05c8026b48a2 100755 --- a/geode-web/build.gradle +++ b/geode-web/build.gradle @@ -18,10 +18,10 @@ apply plugin: 'war' dependencies { - compileOnly 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version' - compileOnly project(path: ':geode-core', configuration: 'classesOutput') + compileOnly('javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version') + compileOnly(project(path: ':geode-core', configuration: 'classesOutput')) - runtimeOnly ('org.springframework:spring-aspects:' + project.'springframework.version') { + runtimeOnly('org.springframework:spring-aspects:' + project.'springframework.version') { exclude module: 'aspectjweaver' exclude module: 'aopalliance' exclude module: 'spring-core' @@ -40,36 +40,36 @@ dependencies { exclude module: 'commons-io' } - testCompile project(':geode-core') - testCompile project(':geode-junit') + testCompile(project(':geode-core')) + testCompile(project(':geode-junit')) // have to use output since we exclude the dependent classes from jar :( - testCompile project(path: ':geode-core', configuration: 'classesOutput') - testCompile project(':geode-junit') - testCompile 'org.springframework:spring-test:' + project.'springframework.version' - testCompile ('org.springframework:spring-webmvc:' + project.'springframework.version') { + testCompile(project(path: ':geode-core', configuration: 'classesOutput')) + testCompile(project(':geode-junit')) + testCompile('org.springframework:spring-test:' + project.'springframework.version') + testCompile('org.springframework:spring-webmvc:' + project.'springframework.version') { exclude module: 'aopalliance' exclude module: 'spring-aop' } - integrationTestCompile project(":geode-dunit") + integrationTestCompile(project(':geode-dunit')) - integrationTestRuntime files(war.destinationDir) - integrationTestRuntime ('org.springframework:spring-webmvc:' + project.'springframework.version') { + integrationTestRuntime(files(war.destinationDir)) + integrationTestRuntime('org.springframework:spring-webmvc:' + project.'springframework.version') { exclude module: 'aopalliance' exclude module: 'spring-aop' } - distributedTestCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version' + distributedTestCompile('pl.pragmatists:JUnitParams:' + project.'JUnitParams.version') - distributedTestRuntime files(war.destinationDir) - distributedTestRuntime ('org.springframework:spring-webmvc:' + project.'springframework.version') { + distributedTestRuntime(files(war.destinationDir)) + distributedTestRuntime('org.springframework:spring-webmvc:' + project.'springframework.version') { exclude module: 'aopalliance' exclude module: 'spring-aop' } - upgradeTestCompile (project(":geode-dunit")) { + upgradeTestCompile(project(':geode-dunit')) { exclude module: 'geode-core' } } diff --git a/gradle/spotless.gradle b/gradle/spotless.gradle index a49255e8a4ee..3eeea10cc435 100644 --- a/gradle/spotless.gradle +++ b/gradle/spotless.gradle @@ -63,18 +63,18 @@ subprojects { // Enforce style modifier order custom 'Modifier ordering', { def modifierRanking = [ - public : 1, - protected : 2, - private : 3, - abstract : 4, - default : 5, - static : 6, - final : 7, - transient : 8, - volatile : 9, - synchronized: 10, - native : 11, - strictfp : 12] + "public": 1, + "protected": 2, + "private": 3, + "abstract": 4, + "default": 5, + "static": 6, + "final": 7, + "transient": 8, + "volatile": 9, + "synchronized": 10, + "native": 11, + "strictfp": 12] // Find any instance of multiple modifiers. Lead with a non-word character to avoid // accidental matching against for instance, "an alternative default value" it.replaceAll(/\W(?:public |protected |private |abstract |default |static |final |transient |volatile |synchronized |native |strictfp ){2,}/, { @@ -100,6 +100,34 @@ subprojects { trimTrailingWhitespace() endWithNewline() } + + groovyGradle { + target project.fileTree(project.projectDir) { + include '**/*.gradle' + exclude '**/generated-src/**' + exclude '**/build/**' + } + + // As the method name suggests, bump this number if any of the below "custom" rules change. + // Spotless will not run on unchanged files unless this number changes. + bumpThisNumberIfACustomStepChanges(0) + + custom 'Use single-quote in project directives.', { + it.replaceAll(/project\(":([^"]*)"\)/, 'project(\':$1\')') + } + + custom 'Use parenthesis in single-line gradle dependency declarations.', { + it.replaceAll(/\n(\s*\S*(?:[cC]ompile|[rR]untime)(?:Only)?) (?!\()([^{\n]*)\n/, { original, declaration, dep -> + "\n${declaration}(${dep})\n" + }) + } + + custom 'Do not pad spaces before parenthesis in gradle dependency declaration.', { + it.replaceAll(/\n(\s*\S*(?:[cC]ompile|[rR]untime)(?:Only)?) +\(/, '\n$1(') + } + + indentWithSpaces(2) + } } // If we add more languages to Spotless, add them to 'compileXYZ' trigger below