Minor: add some clarifications
This commit is contained in:
+8
@@ -438,6 +438,14 @@ open class KotlinAndroidPlugin @Inject constructor(val scriptHandler: ScriptHand
|
||||
}
|
||||
|
||||
javaTask.doFirst {
|
||||
/*
|
||||
* It's important to modify javaTask.classpath only in doFirst,
|
||||
* because Android plugin uses ConventionMapping to modify it too (see JavaCompileConfigAction.execute),
|
||||
* and setting classpath explicitly prevents usage of Android mappings.
|
||||
* Also classpath setted by Android can be modified after excecution of some tasks (see VarianConfiguration.getCompileClasspath)
|
||||
* ex. it adds some support libraries jars after execution of prepareComAndroidSupportSupportV42311Library task,
|
||||
* so it's only safe to modify javaTask.classpath right before its usage
|
||||
*/
|
||||
javaTask.classpath += project.files(kotlinTask.property("kotlinDestinationDir"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user