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
This commit is contained in:
Marcus Da Coregio 2022-01-12 14:35:10 -03:00 committed by Steve Riesenberg
parent bb9d9d7f9d
commit 2ed93ec0cf
1 changed files with 12 additions and 4 deletions

View File

@ -59,14 +59,22 @@ public class IntegrationTestPlugin implements Plugin<Project> {
integrationTestRuntime { integrationTestRuntime {
extendsFrom integrationTestCompile, testRuntime, testRuntimeOnly extendsFrom integrationTestCompile, testRuntime, testRuntimeOnly
} }
integrationTestCompileClasspath {
extendsFrom integrationTestCompile
canBeResolved = true
}
integrationTestRuntimeClasspath {
extendsFrom integrationTestRuntime
canBeResolved = true
}
} }
project.sourceSets { project.sourceSets {
integrationTest { integrationTest {
java.srcDir project.file('src/integration-test/java') java.srcDir project.file('src/integration-test/java')
resources.srcDir project.file('src/integration-test/resources') resources.srcDir project.file('src/integration-test/resources')
compileClasspath = project.sourceSets.main.output + project.sourceSets.test.output + project.configurations.integrationTestCompile compileClasspath = project.sourceSets.main.output + project.sourceSets.test.output + project.configurations.integrationTestCompileClasspath
runtimeClasspath = output + compileClasspath + project.configurations.integrationTestRuntime runtimeClasspath = output + compileClasspath + project.configurations.integrationTestRuntimeClasspath
} }
} }
@ -85,7 +93,7 @@ public class IntegrationTestPlugin implements Plugin<Project> {
project.idea { project.idea {
module { module {
testSourceDirs += project.file('src/integration-test/java') 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> {
project.plugins.withType(EclipsePlugin) { project.plugins.withType(EclipsePlugin) {
project.eclipse.classpath { project.eclipse.classpath {
plusConfigurations += [ project.configurations.integrationTestCompile ] plusConfigurations += [ project.configurations.integrationTestCompileClasspath ]
} }
} }
} }