Fixes to KAPT classpath change detection

1) Fix tests to use canonical path for comparison because Mac was failing
2) Update current classpath snapshot only with the missing entries from the previous one
3) Clean-up code and style
This commit is contained in:
Ivan Gavrilovic
2019-04-10 16:49:29 +01:00
committed by Alexey Tsvetkov
parent 7c78644eb9
commit 929fca03fd
11 changed files with 69 additions and 83 deletions
@@ -5,6 +5,7 @@
package org.jetbrains.kotlin.kapt.base.test.org.jetbrains.kotlin.kapt3.base.incremental
import org.jetbrains.kotlin.base.kapt3.KaptFlag
import org.jetbrains.kotlin.base.kapt3.KaptOptions
import org.jetbrains.kotlin.base.kapt3.collectJavaSourceFiles
import org.jetbrains.kotlin.kapt3.base.KaptContext
@@ -70,7 +71,7 @@ class IncrementalKaptTest {
incrementalCache = incrementalCacheDir
compiledSources.add(classesOutput)
changedFiles.add(sourcesDir.resolve("User.java"))
processIncrementally = true
flags.add(KaptFlag.INCREMENTAL_APT)
}.build()
KaptContext(optionsForSecondRun, true, logger).use {
@@ -144,7 +145,7 @@ class IncrementalKaptTest {
incrementalCache = incrementalCacheDir
compiledSources.add(classesOutput)
changedFiles.add(sourcesDir.resolve("User.java"))
processIncrementally = true
flags.add(KaptFlag.INCREMENTAL_APT)
}.build()
KaptContext(optionsForSecondRun, true, logger).use {