Fix 'verbose' argument was not excluded from task inputs.
^KT-48134 Fixed
This commit is contained in:
+20
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.gradle
|
package org.jetbrains.kotlin.gradle
|
||||||
|
|
||||||
|
import org.gradle.api.logging.LogLevel
|
||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
import org.jetbrains.kotlin.gradle.testbase.*
|
import org.jetbrains.kotlin.gradle.testbase.*
|
||||||
import org.junit.jupiter.api.DisplayName
|
import org.junit.jupiter.api.DisplayName
|
||||||
@@ -152,6 +153,25 @@ class BuildCacheIT : KGPBaseTest() {
|
|||||||
checkKaptCachingIncrementalBuild(firstProject, secondProject)
|
checkKaptCachingIncrementalBuild(firstProject, secondProject)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DisplayName("Debug log level should not break build cache")
|
||||||
|
@GradleTest
|
||||||
|
fun testDebugLogLevelCaching(gradleVersion: GradleVersion) {
|
||||||
|
project("simpleProject", gradleVersion) {
|
||||||
|
enableLocalBuildCache(localBuildCacheDir)
|
||||||
|
|
||||||
|
build(
|
||||||
|
":assemble",
|
||||||
|
buildOptions = defaultBuildOptions.copy(logLevel = LogLevel.DEBUG)
|
||||||
|
) {
|
||||||
|
assertTasksPackedToCache(":compileKotlin")
|
||||||
|
}
|
||||||
|
|
||||||
|
build("clean", ":assemble") {
|
||||||
|
assertTasksFromCache(":compileKotlin")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun checkKotlinCompileCachingIncrementalBuild(
|
private fun checkKotlinCompileCachingIncrementalBuild(
|
||||||
firstProject: TestProject,
|
firstProject: TestProject,
|
||||||
secondProject: TestProject
|
secondProject: TestProject
|
||||||
|
|||||||
+6
-1
@@ -46,7 +46,12 @@ internal object CompilerArgumentsGradleInput {
|
|||||||
// We ignore some file properties e.g. to instead include their values into the Gradle file property checks,
|
// We ignore some file properties e.g. to instead include their values into the Gradle file property checks,
|
||||||
// which, unlike String checks, run with specified path sensitivity;
|
// which, unlike String checks, run with specified path sensitivity;
|
||||||
private val ignoredProperties = setOf<KProperty<*>>(
|
private val ignoredProperties = setOf<KProperty<*>>(
|
||||||
CommonCompilerArguments::verbose, // debug should not lead to rebuild
|
// debug should not lead to rebuild (should include all subclasses where this property is)
|
||||||
|
CommonToolArguments::verbose,
|
||||||
|
CommonCompilerArguments::verbose,
|
||||||
|
K2MetadataCompilerArguments::verbose,
|
||||||
|
K2JSCompilerArguments::verbose,
|
||||||
|
K2JVMCompilerArguments::verbose,
|
||||||
|
|
||||||
K2JVMCompilerArguments::destination, // handled by destinationDir
|
K2JVMCompilerArguments::destination, // handled by destinationDir
|
||||||
K2JVMCompilerArguments::classpath, // handled by classpath of the Gradle tasks
|
K2JVMCompilerArguments::classpath, // handled by classpath of the Gradle tasks
|
||||||
|
|||||||
Reference in New Issue
Block a user