Skip to content

Commit

Permalink
GEODE-9161: Fix simple Gradle 7 warnings (apache#6315)
Browse files Browse the repository at this point in the history
- testRuntime to testRuntimeOnly
- some compile to api
- version to archiveVersion
- basename to distributionbasename

Authored-by: M. Oleske <[email protected]>
  • Loading branch information
moleske authored Apr 16, 2021
1 parent e65228f commit 5f7abc9
Show file tree
Hide file tree
Showing 26 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repositories {
}

dependencies {
testRuntime('org.apache.geode:geode-junit:1.3.0') {
testRuntimeOnly('org.apache.geode:geode-junit:1.3.0') {
exclude group: 'org.apache.logging.log4j'
}
implementation(gradleApi())
Expand Down
6 changes: 3 additions & 3 deletions extensions/geode-modules-session/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ evaluationDependsOn(":geode-core")


dependencies {
compile(platform(project(':boms:geode-all-bom')))
compile(project(':extensions:geode-modules-session-internal')) {
api(platform(project(':boms:geode-all-bom')))
api(project(':extensions:geode-modules-session-internal')) {
exclude module: 'geode-modules'
}
compile(project(':geode-core'))
api(project(':geode-core'))
implementation(project(':geode-common'))

integrationTestImplementation(project(':extensions:geode-modules'))
Expand Down
4 changes: 2 additions & 2 deletions extensions/session-testing-war/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ apply plugin: 'war'


dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
implementation('javax.servlet:javax.servlet-api')
implementation(project(':geode-deployment:geode-deployment-legacy'))
}

war {
version = ''
archiveVersion = ''
}
6 changes: 3 additions & 3 deletions geode-apis-compatible-with-redis/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ facets {
}

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
implementation(project(':geode-serialization'))
implementation(project(':geode-logging'))
implementation(project(':geode-core'))
Expand Down Expand Up @@ -57,7 +57,7 @@ dependencies {
integrationTestImplementation('org.apache.logging.log4j:log4j-core')
// This only exists for debugging PubSubNativeRedisAcceptanceTest
integrationTestImplementation('org.buildobjects:jproc:2.5.1')
integrationTestRuntime(project(':geode-log4j'))
integrationTestRuntimeOnly(project(':geode-log4j'))

acceptanceTestImplementation(sourceSets.integrationTest.output)
acceptanceTestImplementation(sourceSets.distributedTest.output)
Expand All @@ -66,7 +66,7 @@ dependencies {
acceptanceTestImplementation(project(':geode-junit'))
acceptanceTestImplementation('redis.clients:jedis')
acceptanceTestImplementation('org.testcontainers:testcontainers')
acceptanceTestRuntime(project(':geode-log4j'))
acceptanceTestRuntimeOnly(project(':geode-log4j'))
acceptanceTestImplementation('org.springframework.boot:spring-boot-starter-web') {
exclude module: 'spring-boot-starter-tomcat'
}
Expand Down
10 changes: 5 additions & 5 deletions geode-assembly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ task downloadWebServers(type:Copy) {
}

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
gfshDependencies(platform(project(':boms:geode-all-bom')))

dependentProjectNames.each {
Expand Down Expand Up @@ -217,7 +217,7 @@ dependencies {
integrationTestImplementation('javax.annotation:javax.annotation-api')
integrationTestImplementation('javax.servlet:javax.servlet-api')

integrationTestRuntime(project(path: ':geode-old-versions', configuration: 'testOutput'))
integrationTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))

integrationTestRuntimeOnly('io.swagger:swagger-annotations')
// these two modules are for testing only
Expand Down Expand Up @@ -302,7 +302,7 @@ dependencies {
upgradeTestRuntimeOnly(project(':extensions:session-testing-war'))
upgradeTestRuntimeOnly('org.codehaus.cargo:cargo-core-uberjar')
upgradeTestRuntimeOnly('org.apache.httpcomponents:httpclient')
upgradeTestRuntime files({ downloadWebServers } )
upgradeTestRuntimeOnly files({ downloadWebServers } )

//Web servers used for session module testing
webServerTomcat6('apache:tomcat:' + DependencyConstraints.get('tomcat6.version') + '@zip')
Expand Down Expand Up @@ -494,7 +494,7 @@ tasks.register('docs', Javadoc) {

distributions {
src {
baseName = 'apache-geode'
distributionBaseName = 'apache-geode'
contents {
from rootProject.tasks.writeBuildInfo
from (rootDir) {
Expand Down Expand Up @@ -534,7 +534,7 @@ distributions {
}
}
named('main') {
baseName = 'apache-geode'
distributionBaseName = 'apache-geode'
contents {
duplicatesStrategy 'exclude'
exclude '*.asc'
Expand Down
2 changes: 1 addition & 1 deletion geode-assembly/geode-assembly-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"


dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
compileOnly(project(':extensions:geode-modules-test'))
compileOnly(project(':geode-core'))
compileOnly(project(':geode-pulse'))
Expand Down
2 changes: 1 addition & 1 deletion geode-concurrency-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "${project.projectDir}/../gradle/publish-java.gradle"
apply from: "${project.projectDir}/../gradle/warnings.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
implementation('junit:junit')
implementation('org.apache.logging.log4j:log4j-api')
integrationTestImplementation('org.assertj:assertj-core')
Expand Down
2 changes: 1 addition & 1 deletion geode-connectors/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ task downloadJdbcJars(type:Copy) {
}

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))

implementation(project(':geode-logging'))
implementation(project(':geode-serialization'))
Expand Down
14 changes: 7 additions & 7 deletions geode-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ dependencies {
api(project(':geode-management'))


jcaCompile(sourceSets.main.output)
jcaImplementation(sourceSets.main.output)

testImplementation(project(':geode-junit')) {
exclude module: 'geode-core'
Expand All @@ -341,11 +341,11 @@ dependencies {

testImplementation(files("${System.getProperty('java.home')}/../lib/tools.jar"))

testRuntime('commons-collections:commons-collections')
testRuntime('commons-configuration:commons-configuration')
testRuntime('commons-io:commons-io')
testRuntime('commons-validator:commons-validator')
testRuntime('com.pholser:junit-quickcheck-generators')
testRuntimeOnly('commons-collections:commons-collections')
testRuntimeOnly('commons-configuration:commons-configuration')
testRuntimeOnly('commons-io:commons-io')
testRuntimeOnly('commons-validator:commons-validator')
testRuntimeOnly('com.pholser:junit-quickcheck-generators')

// Needed for JDK8, not JDK11, after nebula.facet v7.0.9
integrationTestImplementation(files("${System.getProperty('java.home')}/../lib/tools.jar"))
Expand All @@ -359,7 +359,7 @@ dependencies {
integrationTestImplementation('pl.pragmatists:JUnitParams')
integrationTestImplementation('com.tngtech.archunit:archunit-junit4')

integrationTestRuntime(project(path: ':geode-old-versions', configuration: 'testOutput'))
integrationTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))

integrationTestRuntimeOnly('org.apache.derby:derby')
integrationTestRuntimeOnly('xerces:xercesImpl')
Expand Down
4 changes: 2 additions & 2 deletions geode-dunit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
implementation(project(':geode-logging'))
implementation(project(':geode-serialization'))
implementation(project(':geode-membership'))
Expand All @@ -32,7 +32,7 @@ dependencies {
exclude module: 'geode-core'
}

compile(project(':geode-junit')) {
api(project(':geode-junit')) {
exclude module: 'geode-core'
}

Expand Down
2 changes: 1 addition & 1 deletion geode-http-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "${project.projectDir}/../gradle/publish-java.gradle"
apply from: "${project.projectDir}/../gradle/warnings.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
implementation(project(':geode-logging'))

implementation('org.apache.logging.log4j:log4j-api')
Expand Down
4 changes: 2 additions & 2 deletions geode-junit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))

testImplementation(project(':geode-common'))
compileOnly(project(':geode-core'))
Expand Down Expand Up @@ -59,7 +59,7 @@ dependencies {

testImplementation('pl.pragmatists:JUnitParams')

testRuntime(project(path: ':geode-old-versions', configuration: 'testOutput'))
testRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
}

test {
Expand Down
4 changes: 2 additions & 2 deletions geode-logging/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "${project.projectDir}/../gradle/publish-java.gradle"
apply from: "${project.projectDir}/../gradle/warnings.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))

// Geode-common has annotations and other pieces used by geode-logging
api(project(':geode-common'))
Expand All @@ -37,7 +37,7 @@ dependencies {
testImplementation('junit:junit')
testImplementation('org.assertj:assertj-core')

testRuntime(project(path: ':geode-old-versions', configuration: 'testOutput'))
testRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))

integrationTestImplementation(project(':geode-junit')) {
exclude module: 'geode-logging'
Expand Down
4 changes: 2 additions & 2 deletions geode-lucene/geode-lucene-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"


dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
implementation('org.apache.lucene:lucene-core')
implementation(project(':geode-logging'))
implementation(project(':geode-serialization'))
compile(project(':geode-core'))
api(project(':geode-core'))
compileOnly(project(':geode-lucene'))

implementation('junit:junit')
Expand Down
2 changes: 1 addition & 1 deletion geode-management/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "${project.projectDir}/../gradle/publish-java.gradle"
apply from: "${project.projectDir}/../gradle/warnings.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
implementation('org.apache.commons:commons-lang3')
implementation('commons-io:commons-io')
implementation('com.fasterxml.jackson.core:jackson-databind')
Expand Down
4 changes: 2 additions & 2 deletions geode-membership/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))

// Geode-common has annotations and other pieces used by geode-logging
api(project(':geode-common'))
Expand Down Expand Up @@ -48,7 +48,7 @@ dependencies {
testImplementation('org.assertj:assertj-core')
testImplementation('com.tngtech.archunit:archunit-junit4')

testRuntime(project(path: ':geode-old-versions', configuration: 'testOutput'))
testRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))


integrationTestImplementation(project(':geode-junit'))
Expand Down
2 changes: 1 addition & 1 deletion geode-pulse/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "${project.projectDir}/../gradle/warnings.gradle"
jar.enabled = true

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
compileOnly(platform(project(':boms:geode-all-bom')))
providedCompile(platform(project(':boms:geode-all-bom')))

Expand Down
10 changes: 5 additions & 5 deletions geode-pulse/geode-pulse-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
apply from: "${rootDir}/${scriptDir}/warnings.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
implementation('org.awaitility:awaitility')
implementation('junit:junit')
implementation('org.eclipse.jetty:jetty-server')
Expand All @@ -30,10 +30,10 @@ dependencies {
ext.optional = true
}

compile(project(':geode-core'))
compile(project(':geode-membership'))
compile(project(':geode-http-service'))
compile(project(':geode-junit')) {
api(project(':geode-core'))
api(project(':geode-membership'))
api(project(':geode-http-service'))
api(project(':geode-junit')) {
exclude module: 'geode-core'
}
compileOnly(project(':geode-pulse'))
Expand Down
4 changes: 2 additions & 2 deletions geode-rebalancer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ apply from: "${project.projectDir}/../gradle/warnings.gradle"


dependencies {
compile(platform(project(':boms:geode-all-bom')))
compile(project(':geode-core'))
api(platform(project(':boms:geode-all-bom')))
api(project(':geode-core'))
implementation(project(':geode-serialization'))
implementation(project(':geode-logging'))
integrationTestImplementation(project(':geode-junit')) {
Expand Down
2 changes: 1 addition & 1 deletion geode-serialization/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
testImplementation('junit:junit')
testImplementation('org.assertj:assertj-core')

testRuntime(project(path: ':geode-old-versions', configuration: 'testOutput'))
testRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))

integrationTestImplementation(project(':geode-junit')) {
exclude module: 'geode-serialization'
Expand Down
2 changes: 1 addition & 1 deletion geode-wan/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
compile(platform(project(':boms:geode-all-bom')))
api(platform(project(':boms:geode-all-bom')))
compileOnly(platform(project(':boms:geode-all-bom')))


Expand Down
2 changes: 1 addition & 1 deletion geode-web-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ configurations {
}

dependencies {
compile(platform(project(':boms:geode-all-bom'))){
api(platform(project(':boms:geode-all-bom'))){
exclude module: "jackson-annotations"
}

Expand Down
2 changes: 1 addition & 1 deletion geode-web-management/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ configurations {
war {}
}
dependencies {
compile(platform(project(':boms:geode-all-bom'))) {
api(platform(project(':boms:geode-all-bom'))) {
exclude module: "jackson-annotations"
}
compileOnly(project(':geode-logging'))
Expand Down
4 changes: 2 additions & 2 deletions geode-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ dependencies {

integrationTestImplementation(project(':geode-dunit'));

integrationTestRuntimeOnly(files(war.destinationDir))
integrationTestRuntimeOnly(files(war.destinationDirectory))

distributedTestImplementation(project(':geode-common'))
distributedTestImplementation(project(':geode-dunit'))
distributedTestImplementation('pl.pragmatists:JUnitParams')

distributedTestRuntimeOnly(files(war.destinationDir))
distributedTestRuntimeOnly(files(war.destinationDirectory))

upgradeTestImplementation(project(':geode-dunit')) {
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ gradle.taskGraph.whenReady({ graph ->
attributes.put("Manifest-Version", "1.0")
attributes.put("Created-By", System.getProperty("user.name"))
attributes.put("Title", rootProject.name)
attributes.put("Version", version)
attributes.put("Version", archiveVersion)
attributes.put("Organization", productOrg)
attributes.put("Class-Path", runtimeList.join(' '))
attributes.put("Dependent-Modules", projectDependencies.collect({ "${it.name}-${it.version}" }).join(' '))
Expand All @@ -133,7 +133,7 @@ configurations {
// be created as libs/foo-sources.jar instead of libs/extensions/foo-sources.jar for example.
tasks.all { task ->
if (task instanceof Jar) {
baseName = project.name
archiveBaseName = project.name
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ dependencies {
transitive = false
}

testRuntime('cglib:cglib:' + DependencyConstraints.get('cglib.version')) {
testRuntimeOnly('cglib:cglib:' + DependencyConstraints.get('cglib.version')) {
exclude module: 'org.apache.ant'
}
}
Expand Down

0 comments on commit 5f7abc9

Please sign in to comment.