Fix subplugin options for K/N
This commit is contained in:
+1
-1
@@ -397,7 +397,7 @@ open class KotlinNativeTargetConfigurator(
|
|||||||
private fun AbstractKotlinNativeCompile.addCompilerPlugins() {
|
private fun AbstractKotlinNativeCompile.addCompilerPlugins() {
|
||||||
SubpluginEnvironment
|
SubpluginEnvironment
|
||||||
.loadSubplugins(project, kotlinPluginVersion)
|
.loadSubplugins(project, kotlinPluginVersion)
|
||||||
.addSubpluginOptions<CommonCompilerArguments>(project, this, compilerPluginOptions)
|
.addSubpluginOptions(project, this, compilerPluginOptions)
|
||||||
compilerPluginClasspath = project.configurations.getByName(NATIVE_COMPILER_PLUGIN_CLASSPATH_CONFIGURATION_NAME)
|
compilerPluginClasspath = project.configurations.getByName(NATIVE_COMPILER_PLUGIN_CLASSPATH_CONFIGURATION_NAME)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -58,7 +58,7 @@ class SubpluginEnvironment(
|
|||||||
kotlinCompilation
|
kotlinCompilation
|
||||||
)
|
)
|
||||||
|
|
||||||
fun <C : CommonCompilerArguments> addSubpluginOptions(
|
fun addSubpluginOptions(
|
||||||
project: Project,
|
project: Project,
|
||||||
kotlinTask: AbstractCompile,
|
kotlinTask: AbstractCompile,
|
||||||
pluginOptions: CompilerPluginOptions,
|
pluginOptions: CompilerPluginOptions,
|
||||||
@@ -66,7 +66,7 @@ class SubpluginEnvironment(
|
|||||||
variantData: Any? = null,
|
variantData: Any? = null,
|
||||||
androidProjectHandler: AbstractAndroidProjectHandler<out Any?>? = null,
|
androidProjectHandler: AbstractAndroidProjectHandler<out Any?>? = null,
|
||||||
kotlinCompilation: KotlinCompilation<*>? = null
|
kotlinCompilation: KotlinCompilation<*>? = null
|
||||||
): List<KotlinGradleSubplugin<AbstractKotlinCompile<C>>> {
|
): List<KotlinGradleSubplugin<AbstractCompile>> {
|
||||||
val appliedSubplugins = subplugins.filter { it.isApplicable(project, kotlinTask) }
|
val appliedSubplugins = subplugins.filter { it.isApplicable(project, kotlinTask) }
|
||||||
for (subplugin in appliedSubplugins) {
|
for (subplugin in appliedSubplugins) {
|
||||||
if (!subplugin.isApplicable(project, kotlinTask)) continue
|
if (!subplugin.isApplicable(project, kotlinTask)) continue
|
||||||
|
|||||||
Reference in New Issue
Block a user