Skip to content

Commit

Permalink
GEODE-5879 Enforces consistent syntax in gradle dependency declaration (
Browse files Browse the repository at this point in the history
apache#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 <[email protected]>
Co-authored-by: Patrick Rhomberg <[email protected]>
  • Loading branch information
robbadler and PurelyApplied authored Oct 17, 2018
1 parent 567569b commit 8910561
Show file tree
Hide file tree
Showing 30 changed files with 397 additions and 392 deletions.
6 changes: 3 additions & 3 deletions extensions/geode-modules-session-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
disableMavenPublishing()
14 changes: 7 additions & 7 deletions extensions/geode-modules-session/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions extensions/geode-modules-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
}
Expand Down
20 changes: 10 additions & 10 deletions extensions/geode-modules-tomcat7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
14 changes: 7 additions & 7 deletions extensions/geode-modules-tomcat8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
18 changes: 9 additions & 9 deletions extensions/geode-modules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
5 changes: 3 additions & 2 deletions extensions/session-testing-war/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
124 changes: 62 additions & 62 deletions geode-assembly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -416,62 +416,62 @@ 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
from gfshDepsJar
}

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') {
from docs
}

into ('tools/Pulse') {
from (project(":geode-pulse").configurations.archives.allArtifacts.files)
from (project(':geode-pulse').configurations.archives.allArtifacts.files)
}

into ('tools/Modules') {
Expand Down
22 changes: 10 additions & 12 deletions geode-assembly/geode-assembly-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion geode-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
*/

dependencies {
testCompile project(':geode-junit')
testCompile(project(':geode-junit'))
}
Loading

0 comments on commit 8910561

Please sign in to comment.