Remove projectDir input from KaptWithoutKotlincTask

It is redundant since the task would be restarted when project dir changes,
because paths of sources would also change
This commit is contained in:
Alexey Tsvetkov
2018-06-27 02:32:14 +03:00
parent 9b97108db4
commit 357518be0d
2 changed files with 1 additions and 7 deletions
@@ -378,8 +378,6 @@ class Kapt3KotlinGradleSubplugin : KotlinGradleSubplugin<KotlinCompile> {
if (kaptTask is KaptWithoutKotlincTask) {
with(kaptTask) {
projectDir = project.projectDir
isVerbose = project.isKaptVerbose()
mapDiagnosticLocations = kaptExtension.mapDiagnosticLocations
annotationProcessorFqNames = kaptExtension.processors.split(',').filter { it.isNotEmpty() }
@@ -25,10 +25,6 @@ open class KaptWithoutKotlincTask @Inject constructor(private val workerExecutor
val kaptJars: Collection<File>
get() = project.configurations.getByName(KAPT_WORKER_DEPENDENCIES_CONFIGURATION_NAME).resolve()
@get:InputFile
@get:PathSensitive(PathSensitivity.RELATIVE)
lateinit var projectDir: File
@get:Input
var isVerbose: Boolean = false
@@ -51,7 +47,7 @@ open class KaptWithoutKotlincTask @Inject constructor(private val workerExecutor
clearOutputDirectories()
val paths = KaptPathsForWorker(
projectDir,
project.projectDir,
classpath.files.toList(),
kaptClasspath.files.toList(),
javaSourceRoots.toList(),