Expose statically-typed kotlinOptions and compileKotlinTask in DSL
To simplify configuring a `KotlinCompilation` with Gradle Kotlin DSL, it is essential to expose statically-known types where possible. This commit parametrizes `KotlinCompilation` with its Kotlin options type (a subtype of `KotlinCommonOptions`) and adds `kotlinOptions` and `compileKotlinTask` to `KotlinCompilation`. (minor) Also reduce the visibility of `attachClassesDir` and `setupPlugins` to internal, since this API is not for external use.
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ class ExampleSubplugin : KotlinGradleSubplugin<AbstractCompile> {
|
||||
javaCompile: AbstractCompile?,
|
||||
variantData: Any?,
|
||||
androidProjectHandler: Any?,
|
||||
kotlinCompilation: KotlinCompilation?
|
||||
kotlinCompilation: KotlinCompilation<*>?
|
||||
): List<SubpluginOption> {
|
||||
println("ExampleSubplugin loaded")
|
||||
return listOf(SubpluginOption("exampleKey", "exampleValue"))
|
||||
|
||||
Reference in New Issue
Block a user