Skip to content

Commit 2ed93ec

Browse files
marcusdacoregioSteve Riesenberg
authored and
Steve Riesenberg
committed
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
1 parent bb9d9d7 commit 2ed93ec

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,22 @@ public class IntegrationTestPlugin implements Plugin<Project> {
5959
integrationTestRuntime {
6060
extendsFrom integrationTestCompile, testRuntime, testRuntimeOnly
6161
}
62+
integrationTestCompileClasspath {
63+
extendsFrom integrationTestCompile
64+
canBeResolved = true
65+
}
66+
integrationTestRuntimeClasspath {
67+
extendsFrom integrationTestRuntime
68+
canBeResolved = true
69+
}
6270
}
6371

6472
project.sourceSets {
6573
integrationTest {
6674
java.srcDir project.file('src/integration-test/java')
6775
resources.srcDir project.file('src/integration-test/resources')
68-
compileClasspath = project.sourceSets.main.output + project.sourceSets.test.output + project.configurations.integrationTestCompile
69-
runtimeClasspath = output + compileClasspath + project.configurations.integrationTestRuntime
76+
compileClasspath = project.sourceSets.main.output + project.sourceSets.test.output + project.configurations.integrationTestCompileClasspath
77+
runtimeClasspath = output + compileClasspath + project.configurations.integrationTestRuntimeClasspath
7078
}
7179
}
7280

@@ -85,7 +93,7 @@ public class IntegrationTestPlugin implements Plugin<Project> {
8593
project.idea {
8694
module {
8795
testSourceDirs += project.file('src/integration-test/java')
88-
scopes.TEST.plus += [ project.configurations.integrationTestCompile ]
96+
scopes.TEST.plus += [ project.configurations.integrationTestCompileClasspath ]
8997
}
9098
}
9199
}
@@ -115,7 +123,7 @@ public class IntegrationTestPlugin implements Plugin<Project> {
115123

116124
project.plugins.withType(EclipsePlugin) {
117125
project.eclipse.classpath {
118-
plusConfigurations += [ project.configurations.integrationTestCompile ]
126+
plusConfigurations += [ project.configurations.integrationTestCompileClasspath ]
119127
}
120128
}
121129
}

0 commit comments

Comments
 (0)