[Build] Apply :idea:idea-gradle classpath modification on JPS build only

This modification is incompatible with Gradle configuration cache
Relates to #KT-44611
This commit is contained in:
Alexander Likhachev
2021-02-26 10:39:53 +03:00
parent 57f5939f5e
commit 35df00e071
+10 -8
View File
@@ -106,14 +106,16 @@ projectTest(parallel = false) {
workingDir = rootDir
useAndroidSdk()
doFirst {
val mainResourceDirPath = File(project.buildDir, "resources/main").absolutePath
sourceSets["test"].runtimeClasspath = sourceSets["test"].runtimeClasspath.filter { file ->
if (!file.absolutePath.contains(mainResourceDirPath)) {
true
} else {
println("Remove `${file.path}` from the test runtime classpath")
false
if (kotlinBuildProperties.isJpsBuildEnabled) {
doFirst {
val mainResourceDirPath = File(project.buildDir, "resources/main").absolutePath
sourceSets["test"].runtimeClasspath = sourceSets["test"].runtimeClasspath.filter { file ->
if (!file.absolutePath.contains(mainResourceDirPath)) {
true
} else {
println("Remove `${file.path}` from the test runtime classpath")
false
}
}
}
}