Minor: add some clarifications

This commit is contained in:
Natalia Ukhorskaya
2016-01-27 11:04:04 +03:00
parent 9b978377d0
commit 2fa00f87e0
@@ -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"))
}
}