Fix subplugin options for K/N

This commit is contained in:
Ilya Matveev
2019-02-12 18:50:11 +03:00
parent 2678ada5ae
commit 7c3c21790b
2 changed files with 3 additions and 3 deletions
@@ -397,7 +397,7 @@ open class KotlinNativeTargetConfigurator(
private fun AbstractKotlinNativeCompile.addCompilerPlugins() {
SubpluginEnvironment
.loadSubplugins(project, kotlinPluginVersion)
.addSubpluginOptions<CommonCompilerArguments>(project, this, compilerPluginOptions)
.addSubpluginOptions(project, this, compilerPluginOptions)
compilerPluginClasspath = project.configurations.getByName(NATIVE_COMPILER_PLUGIN_CLASSPATH_CONFIGURATION_NAME)
}
@@ -58,7 +58,7 @@ class SubpluginEnvironment(
kotlinCompilation
)
fun <C : CommonCompilerArguments> addSubpluginOptions(
fun addSubpluginOptions(
project: Project,
kotlinTask: AbstractCompile,
pluginOptions: CompilerPluginOptions,
@@ -66,7 +66,7 @@ class SubpluginEnvironment(
variantData: Any? = null,
androidProjectHandler: AbstractAndroidProjectHandler<out Any?>? = null,
kotlinCompilation: KotlinCompilation<*>? = null
): List<KotlinGradleSubplugin<AbstractKotlinCompile<C>>> {
): List<KotlinGradleSubplugin<AbstractCompile>> {
val appliedSubplugins = subplugins.filter { it.isApplicable(project, kotlinTask) }
for (subplugin in appliedSubplugins) {
if (!subplugin.isApplicable(project, kotlinTask)) continue