From 2ed93ec0cf01445e08ee5e691dc8a57bc790fa01 Mon Sep 17 00:00:00 2001 From: Marcus Da Coregio Date: Wed, 12 Jan 2022 14:35:10 -0300 Subject: [PATCH] Rename integrationTestCompile/Runtime configurations The kotlin-gradle-plugin is changing some configuration's properties from configurations that has the same prefix as the sourceSet. It is enforcing the canBeResolved property to false. See https://youtrack.jetbrains.com/issue/KT-50748. This commits changes the suffix to compile -> compileClasspath, runtime -> runtimeClasspath to workaround this issue. Issue gh-10350 --- .../convention/IntegrationTestPlugin.groovy | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy index 9858458b8f..059fdfbc8b 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy @@ -59,14 +59,22 @@ public class IntegrationTestPlugin implements Plugin { integrationTestRuntime { extendsFrom integrationTestCompile, testRuntime, testRuntimeOnly } + integrationTestCompileClasspath { + extendsFrom integrationTestCompile + canBeResolved = true + } + integrationTestRuntimeClasspath { + extendsFrom integrationTestRuntime + canBeResolved = true + } } project.sourceSets { integrationTest { java.srcDir project.file('src/integration-test/java') resources.srcDir project.file('src/integration-test/resources') - compileClasspath = project.sourceSets.main.output + project.sourceSets.test.output + project.configurations.integrationTestCompile - runtimeClasspath = output + compileClasspath + project.configurations.integrationTestRuntime + compileClasspath = project.sourceSets.main.output + project.sourceSets.test.output + project.configurations.integrationTestCompileClasspath + runtimeClasspath = output + compileClasspath + project.configurations.integrationTestRuntimeClasspath } } @@ -85,7 +93,7 @@ public class IntegrationTestPlugin implements Plugin { project.idea { module { testSourceDirs += project.file('src/integration-test/java') - scopes.TEST.plus += [ project.configurations.integrationTestCompile ] + scopes.TEST.plus += [ project.configurations.integrationTestCompileClasspath ] } } } @@ -115,7 +123,7 @@ public class IntegrationTestPlugin implements Plugin { project.plugins.withType(EclipsePlugin) { project.eclipse.classpath { - plusConfigurations += [ project.configurations.integrationTestCompile ] + plusConfigurations += [ project.configurations.integrationTestCompileClasspath ] } } }