diff --git a/build.gradle.kts b/build.gradle.kts index f91c52c9aa0..adc317450ff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -250,7 +250,6 @@ apply { } apply { plugin("jps-compatible") } -apply { plugin("jps-compatible-root") } fun Project.allprojectsRecursive(body: Project.() -> Unit) { this.body() diff --git a/buildSrc/src/main/kotlin/pill/plugin.kt b/buildSrc/src/main/kotlin/pill/plugin.kt index 7c92d5e6a56..1d7b5a071cc 100644 --- a/buildSrc/src/main/kotlin/pill/plugin.kt +++ b/buildSrc/src/main/kotlin/pill/plugin.kt @@ -9,13 +9,6 @@ import shadow.org.jdom2.output.XMLOutputter import java.io.File class JpsCompatiblePlugin : Plugin { - override fun apply(project: Project) { - // 'jpsTest' does not require the 'tests-jar' artifact - project.configurations.create("jpsTest") - } -} - -class JpsCompatibleRootPlugin : Plugin { companion object { private fun mapper(module: String, vararg configurations: String): DependencyMapper { return DependencyMapper("org.jetbrains.kotlin", module, *configurations) { MappedDependency(PDependency.Library(module)) } @@ -82,24 +75,23 @@ class JpsCompatibleRootPlugin : Plugin { ) ) } - } override fun apply(project: Project) { - if (project != project.rootProject) { - error("JpsCompatible root plugin can be applied only to the root project") - } + // 'jpsTest' does not require the 'tests-jar' artifact + project.configurations.create("jpsTest") - project.tasks.create("pill") { - doLast { pill(project) } - } + if (project == project.rootProject) { + project.tasks.create("pill") { + doLast { pill(project) } + } - project.tasks.create("unpill") { - doLast { unpill(project) } + project.tasks.create("unpill") { + doLast { unpill(project) } + } } } - private lateinit var projectDir: File private lateinit var platformVersion: String private lateinit var platformBaseNumber: String diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/jps-compatible-root.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/jps-compatible-root.properties deleted file mode 100644 index df550eb444b..00000000000 --- a/buildSrc/src/main/resources/META-INF/gradle-plugins/jps-compatible-root.properties +++ /dev/null @@ -1 +0,0 @@ -implementation-class=org.jetbrains.kotlin.pill.JpsCompatibleRootPlugin \ No newline at end of file