[Gradle] Implement ApplyJavaBasePluginSetupAction
KT-61634
This commit is contained in:
committed by
Space Team
parent
c47db02d30
commit
d5be59a8ec
+13
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.gradle.plugin.mpp
|
||||
|
||||
import org.gradle.api.plugins.JavaBasePlugin
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinProjectSetupAction
|
||||
|
||||
internal val ApplyJavaBasePluginSetupAction = KotlinProjectSetupAction {
|
||||
project.plugins.apply(JavaBasePlugin::class.java)
|
||||
}
|
||||
+1
-5
@@ -7,13 +7,9 @@ package org.jetbrains.kotlin.gradle.plugin.mpp
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.JavaBasePlugin
|
||||
|
||||
class KotlinMultiplatformPlugin : Plugin<Project> {
|
||||
|
||||
override fun apply(project: Project) {
|
||||
project.plugins.apply(JavaBasePlugin::class.java)
|
||||
}
|
||||
override fun apply(project: Project) = Unit
|
||||
|
||||
companion object {
|
||||
const val METADATA_TARGET_NAME = "metadata"
|
||||
|
||||
+1
@@ -69,6 +69,7 @@ internal fun Project.registerKotlinPluginExtensions() {
|
||||
}
|
||||
|
||||
if (isMultiplatform) {
|
||||
register(project, ApplyJavaBasePluginSetupAction)
|
||||
register(project, DeprecatedMppGradlePropertiesMigrationSetupAction)
|
||||
register(project, KotlinMultiplatformTargetPresetAction)
|
||||
register(project, KotlinMultiplatformSourceSetSetupAction)
|
||||
|
||||
Reference in New Issue
Block a user