Replace testRuntime configuration with testRuntimeOnly.

This commit is contained in:
John Blum
2022-01-27 18:46:00 -08:00
parent dcabde9f13
commit 55ffae046c
5 changed files with 13 additions and 13 deletions

View File

@@ -43,7 +43,7 @@ class DependencyManagementExportTask extends DefaultTask {
def projects = this.projects ?: project.subprojects + project
def configurations = projects*.configurations*.findAll {
[ 'testRuntime', 'integrationTestRuntime', 'grettyRunnerTomcat10', 'ajtools' ].contains(it.name)
[ 'testRuntimeOnly', 'integrationTestRuntime', 'grettyRunnerTomcat10', 'ajtools' ].contains(it.name)
}
def dependencyResults = configurations*.incoming*.resolutionResult*.allDependencies.flatten()

View File

@@ -29,7 +29,7 @@ import org.springframework.gradle.propdeps.PropDepsPlugin
* Adds Integration Test support to Java projects.
*
* <ul>
* <li>Adds integrationTestCompile and integrationTestRuntime configurations</li>
* <li>Adds integrationTestCompile and integrationTestRuntimeOnly configurations</li>
* <li>Adds new source test folder of src/integration-test/java</li>
* <li>Adds a task to run integration tests named integrationTest</li>
* <li>Adds a new source test folder src/integration-test/groovy if the Groovy Plugin was added</li>
@@ -58,10 +58,10 @@ class IntegrationTestPlugin implements Plugin<Project> {
project.configurations {
integrationTestCompile {
extendsFrom testImplementation
extendsFrom testCompileClasspath
}
integrationTestRuntime {
extendsFrom integrationTestCompile, testRuntime, testRuntimeOnly
extendsFrom integrationTestCompile, testRuntimeOnly
}
}

View File

@@ -40,7 +40,7 @@ class TestsConfigurationPlugin implements Plugin<Project> {
project.plugins.withType(JavaPlugin) {
project.configurations {
tests.extendsFrom testRuntime, testRuntimeClasspath
tests.extendsFrom testRuntimeClasspath
}
project.tasks.create('testJar', Jar) {

View File

@@ -32,15 +32,15 @@ dependencies {
testCompileOnly "com.google.code.findbugs:jsr305:$findbugsVersion"
testRuntime "javax.cache:cache-api"
testRuntime "org.apache.geode:geode-http-service:$apacheGeodeVersion"
testRuntime "org.apache.geode:geode-web:$apacheGeodeVersion"
testRuntime "org.springframework.boot:spring-boot-starter-jetty"
testRuntime "org.springframework.boot:spring-boot-starter-json"
testRuntime "org.springframework.shell:spring-shell:$springShellVersion"
testRuntimeOnly "javax.cache:cache-api"
testRuntimeOnly "org.apache.geode:geode-http-service:$apacheGeodeVersion"
testRuntimeOnly "org.apache.geode:geode-web:$apacheGeodeVersion"
testRuntimeOnly "org.springframework.boot:spring-boot-starter-jetty"
testRuntimeOnly "org.springframework.boot:spring-boot-starter-json"
testRuntimeOnly "org.springframework.shell:spring-shell:$springShellVersion"
// Runtime Test dependency on Spring Cloud Services (SCS) to verify workaround to SCS problem!
//testRuntime("io.pivotal.spring.cloud:spring-cloud-services-starter-service-registry:2.0.3.RELEASE") {
//testRuntimeOnly("io.pivotal.spring.cloud:spring-cloud-services-starter-service-registry:2.0.3.RELEASE") {
// exclude group: "org.apache.logging.log4j", module: "log4j-core"
//}

View File

@@ -37,6 +37,6 @@ dependencies {
testImplementation "org.springframework.boot:spring-boot-starter-data-cassandra"
testImplementation "org.springframework.data:spring-data-geode-test"
testRuntime "org.hsqldb:hsqldb"
testRuntimeOnly "org.hsqldb:hsqldb"
}