KT-43686: Make kapt Gradle task cacheable across machines
Use `@Classpath` for kotlin stdlib input property. This is to allow cache hits when builds are running on different machines and path to kotlin stdlib differs. Test: BuildCacheRelocationIT
This commit is contained in:
committed by
nataliya.valtman
parent
771600077c
commit
509ed64917
+2
-1
@@ -128,7 +128,8 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
cacheableTaskNames = listOf(
|
||||
"kaptKotlin", "kaptGenerateStubsKotlin", "compileKotlin", "compileTestKotlin", "compileJava"
|
||||
),
|
||||
initProject = { File(projectDir, "build.gradle").appendText("\nkapt.useBuildCache = true") }
|
||||
initProject = { File(projectDir, "build.gradle").appendText("\nkapt.useBuildCache = true") },
|
||||
withAnotherGradleHome = true
|
||||
),
|
||||
TestCase("kotlin2JsDceProject",
|
||||
taskToExecute = arrayOf("assemble", "runDceKotlinJs"),
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ abstract class KaptWithoutKotlincTask @Inject constructor(private val workerExec
|
||||
@get:Input
|
||||
internal val kotlinAndroidPluginWrapperPluginDoesNotExist = project.plugins.none { it is KotlinAndroidPluginWrapper }
|
||||
|
||||
@get:Input
|
||||
@get:Classpath
|
||||
internal val kotlinStdlibClasspath = findKotlinStdlibClasspath(project)
|
||||
|
||||
@get:Internal
|
||||
|
||||
Reference in New Issue
Block a user