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
-2
@@ -23,7 +23,6 @@ import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin
|
||||
import org.jetbrains.kotlin.gradle.plugin.SubpluginArtifact
|
||||
import org.jetbrains.kotlin.gradle.plugin.SubpluginOption
|
||||
import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile
|
||||
|
||||
class SerializationGradleSubplugin : Plugin<Project> {
|
||||
companion object {
|
||||
@@ -51,7 +50,7 @@ class SerializationKotlinGradleSubplugin : KotlinGradleSubplugin<AbstractCompile
|
||||
javaCompile: AbstractCompile?,
|
||||
variantData: Any?,
|
||||
androidProjectHandler: Any?,
|
||||
kotlinCompilation: KotlinCompilation?
|
||||
kotlinCompilation: KotlinCompilation<*>?
|
||||
): List<SubpluginOption> {
|
||||
return emptyList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user