Avoid warning about scripting subplugin for MPP project
Temporary solution, the subplugin should be adapted to the new MPP #KT-30742 fixed
This commit is contained in:
+5
-1
@@ -17,6 +17,7 @@ import org.gradle.api.tasks.compile.AbstractCompile
|
||||
import org.jetbrains.kotlin.cli.common.messages.MessageRenderer
|
||||
import org.jetbrains.kotlin.cli.common.messages.PrintingMessageCollector
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile
|
||||
import org.jetbrains.kotlin.gradle.dsl.multiplatformExtensionOrNull
|
||||
import org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask
|
||||
import org.jetbrains.kotlin.gradle.plugin.*
|
||||
import org.jetbrains.kotlin.gradle.scripting.ScriptingExtension
|
||||
@@ -69,7 +70,10 @@ class ScriptingGradleSubplugin : Plugin<Project> {
|
||||
project.tasks.withType(KotlinCompile::class.java, configureAction)
|
||||
}
|
||||
} else {
|
||||
project.logger.warn("kotlin scripting plugin: applied to a non-JVM project $project, $MISCONFIGURATION_MESSAGE_SUFFIX")
|
||||
// TODO: implement support for discovery in MPP project: use KotlinSourceSet directly and do not rely on java convevtion sourcesets
|
||||
if (project.multiplatformExtensionOrNull == null) {
|
||||
project.logger.warn("kotlin scripting plugin: applied to a non-JVM project $project, $MISCONFIGURATION_MESSAGE_SUFFIX")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user