From 35df00e07128048907380c533f070cba2d2bb424 Mon Sep 17 00:00:00 2001 From: Alexander Likhachev Date: Fri, 26 Feb 2021 10:39:53 +0300 Subject: [PATCH] [Build] Apply :idea:idea-gradle classpath modification on JPS build only This modification is incompatible with Gradle configuration cache Relates to #KT-44611 --- idea/idea-gradle/build.gradle.kts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/idea/idea-gradle/build.gradle.kts b/idea/idea-gradle/build.gradle.kts index d85fd0aba37..9eb4e2817b9 100644 --- a/idea/idea-gradle/build.gradle.kts +++ b/idea/idea-gradle/build.gradle.kts @@ -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 + } } } }