Remove custom cache version checks from Gradle
#KT-21009 fixed Cache version could be changed only when compiler is changed. @InputFiles on `AbstractKotlinCompileTool#computedCompilerClasspath` ensures that non incremental build is performed when compiler is changed.
This commit is contained in:
-13
@@ -77,12 +77,6 @@ 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>
|
||||
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)
|
||||
var incremental: Boolean = false
|
||||
@@ -92,13 +86,6 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractKo
|
||||
logger.kotlinDebug { "Set $this.incremental=$value" }
|
||||
}
|
||||
|
||||
internal val isCacheFormatUpToDate: Boolean
|
||||
get() {
|
||||
if (!incremental) return true
|
||||
|
||||
return cacheVersions.all { it.checkVersion() == CacheVersion.Action.DO_NOTHING }
|
||||
}
|
||||
|
||||
abstract protected fun createCompilerArgs(): T
|
||||
|
||||
internal val pluginOptions = CompilerPluginOptions()
|
||||
|
||||
-1
@@ -41,7 +41,6 @@ internal open class KotlinTasksProvider {
|
||||
this.sourceSetName = sourceSetName
|
||||
this.friendTaskName = taskToFriendTaskMapper[this]
|
||||
mapKotlinTaskProperties(project, this)
|
||||
outputs.upToDateWhen { isCacheFormatUpToDate }
|
||||
}
|
||||
|
||||
protected open val taskToFriendTaskMapper: TaskToFriendTaskMapper =
|
||||
|
||||
Reference in New Issue
Block a user