Unify build cache debug approach.
^KT-45745 In Progress
This commit is contained in:
+1
-1
@@ -189,7 +189,7 @@ class BuildCacheIT : KGPBaseTest() {
|
||||
// Change the return type of foo() from Int to String in foo.kt, and check that fooUsage.kt is recompiled as well:
|
||||
val fooKtSourceFile = secondProject.projectPath.resolve("src/main/kotlin/foo.kt")
|
||||
fooKtSourceFile.modify { it.replace("Int = 1", "String = \"abc\"") }
|
||||
secondProject.build("assemble", forceOutput = true) {
|
||||
secondProject.build("assemble") {
|
||||
assertIncrementalCompilation(modifiedFiles = setOf(fooKtSourceFile))
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -116,7 +116,7 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
enableLocalBuildCache(buildCache)
|
||||
useToolchainExtension(11)
|
||||
|
||||
build("assemble", forceOutput = true, enableBuildCacheDebug = true)
|
||||
build("assemble")
|
||||
}
|
||||
|
||||
project(
|
||||
@@ -129,7 +129,7 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
enableLocalBuildCache(buildCache)
|
||||
useToolchainExtension(11)
|
||||
|
||||
build("assemble", enableBuildCacheDebug = true) {
|
||||
build("assemble") {
|
||||
assertTasksFromCache(":compileKotlin")
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,6 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true)
|
||||
) {
|
||||
enableLocalBuildCache(buildCache)
|
||||
enableBuildCacheDebug()
|
||||
if (shouldUseToolchain(gradleVersion)) {
|
||||
useToolchainExtension(11)
|
||||
} else {
|
||||
@@ -166,7 +165,6 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true)
|
||||
) {
|
||||
enableLocalBuildCache(buildCache)
|
||||
enableBuildCacheDebug()
|
||||
build("assemble") {
|
||||
assertTasksExecuted(":compileKotlin")
|
||||
}
|
||||
|
||||
-6
@@ -151,12 +151,6 @@ fun TestProject.enableLocalBuildCache(
|
||||
)
|
||||
}
|
||||
|
||||
fun TestProject.enableBuildCacheDebug() {
|
||||
gradleProperties.append(
|
||||
"org.gradle.caching.debug=true"
|
||||
)
|
||||
}
|
||||
|
||||
class TestProject(
|
||||
val gradleRunner: GradleRunner,
|
||||
val projectName: String,
|
||||
|
||||
Reference in New Issue
Block a user