Add Kotlin & Java destination dirs as output of Android compilation

The compilation outputs of Android compilations accidentally were left
empty. The `destinationDir`s of the Kotlin & Java tasks should be
registered in the `output.classesDirs`.
This commit is contained in:
Sergey Igushkin
2019-08-23 15:59:55 +03:00
parent 9836a1ca4a
commit 0e59553d12
2 changed files with 7 additions and 1 deletions
@@ -83,6 +83,11 @@ class Android25ProjectHandler(
.toTypedArray()
}
kotlinTask.javaOutputDir = javaTask.destinationDir
compilation.output.classesDirs.run {
from(project.files(kotlinTask.taskData.destinationDir).builtBy(kotlinTask))
from(project.files(project.provider { javaTask.destinationDir }).builtBy(javaTask))
}
}
override fun getSourceProviders(variantData: BaseVariant): Iterable<SourceProvider> =
@@ -139,7 +139,8 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractKo
@get:Internal
internal var buildReportMode: BuildReportMode? = null
private val taskData: KotlinCompileTaskData
@get:Internal
internal val taskData: KotlinCompileTaskData
get() = KotlinCompileTaskData.get(project, name)
@get:Input