Annotate the properties with @PathSensitive (+ override source)

This commit is contained in:
Sergey Igushkin
2017-11-16 22:16:41 +03:00
parent e46b56acbc
commit 26c158cbae
2 changed files with 7 additions and 1 deletions
@@ -58,8 +58,9 @@ open class KaptTask : ConventionTask(), CompilerArgumentAware<K2JVMCompilerArgum
@get:Classpath @get:InputFiles
internal val pluginClasspath get() = pluginOptions.classpath
@get:InputFiles @get:PathSensitive(PathSensitivity.ABSOLUTE)
val source: FileCollection
@InputFiles get() {
get() {
val sourcesFromKotlinTask = kotlinCompileTask.source
.filter { it.extension == "java" && !isInsideDestinationDirs(it) }
@@ -63,6 +63,10 @@ abstract class AbstractKotlinCompileTool<T : CommonToolArguments>() : AbstractCo
@get:Internal
var compilerClasspath: List<File>? = null
@InputFiles
@PathSensitive(PathSensitivity.ABSOLUTE)
override fun getSource() = super.getSource()
@get:Classpath @get:InputFiles
internal val computedCompilerClasspath: List<File>
get() = compilerClasspath?.takeIf { it.isNotEmpty() }
@@ -461,6 +465,7 @@ open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArguments>(),
@get:InputFiles
@get:Optional
@get:PathSensitive(PathSensitivity.ABSOLUTE)
internal val friendDependency
get() = friendTaskName
?.let { project.getTasksByName(it, false).singleOrNull() as? Kotlin2JsCompile }