Fix Gradle IC cache version checking
This commit is contained in:
+5
-4
@@ -67,10 +67,11 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractKo
|
||||
internal val taskBuildDirectory: File
|
||||
get() = File(File(project.buildDir, KOTLIN_BUILD_DIR_NAME), name).apply { mkdirs() }
|
||||
|
||||
private val cacheVersions: List<CacheVersion> =
|
||||
listOf(normalCacheVersion(taskBuildDirectory),
|
||||
dataContainerCacheVersion(taskBuildDirectory),
|
||||
gradleCacheVersion(taskBuildDirectory))
|
||||
private val cacheVersions: List<CacheVersion>
|
||||
get() =
|
||||
listOf(normalCacheVersion(taskBuildDirectory, enabled = incremental),
|
||||
dataContainerCacheVersion(taskBuildDirectory, enabled = incremental),
|
||||
gradleCacheVersion(taskBuildDirectory, enabled = incremental))
|
||||
|
||||
// indicates that task should compile kotlin incrementally if possible
|
||||
// it's not possible when IncrementalTaskInputs#isIncremental returns false (i.e first build)
|
||||
|
||||
+2
-2
@@ -21,5 +21,5 @@ import java.io.File
|
||||
internal const val GRADLE_CACHE_VERSION = 4
|
||||
internal const val GRADLE_CACHE_VERSION_FILE_NAME = "gradle-format-version.txt"
|
||||
|
||||
internal fun gradleCacheVersion(dataRoot: File): CacheVersion =
|
||||
customCacheVersion(GRADLE_CACHE_VERSION, GRADLE_CACHE_VERSION_FILE_NAME, dataRoot)
|
||||
internal fun gradleCacheVersion(dataRoot: File, enabled: Boolean): CacheVersion =
|
||||
customCacheVersion(GRADLE_CACHE_VERSION, GRADLE_CACHE_VERSION_FILE_NAME, dataRoot, enabled)
|
||||
|
||||
Reference in New Issue
Block a user