Build: Remove explicit legacy maven plugin application
This commit is contained in:
@@ -31,12 +31,18 @@ open class PublishedKotlinModule : Plugin<Project> {
|
|||||||
|
|
||||||
plugins.apply("maven")
|
plugins.apply("maven")
|
||||||
|
|
||||||
val publishedRuntime by configurations.creating {
|
configurations.maybeCreate("publishedRuntime").apply {
|
||||||
the<MavenPluginConvention>()
|
the<MavenPluginConvention>()
|
||||||
.conf2ScopeMappings
|
.conf2ScopeMappings
|
||||||
.addMapping(0, this, Conf2ScopeMappingContainer.RUNTIME)
|
.addMapping(0, this, Conf2ScopeMappingContainer.RUNTIME)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.maybeCreate("publishedCompile").apply {
|
||||||
|
the<MavenPluginConvention>()
|
||||||
|
.conf2ScopeMappings
|
||||||
|
.addMapping(0, this, Conf2ScopeMappingContainer.COMPILE)
|
||||||
|
}
|
||||||
|
|
||||||
if (!project.hasProperty("prebuiltJar")) {
|
if (!project.hasProperty("prebuiltJar")) {
|
||||||
plugins.apply("signing")
|
plugins.apply("signing")
|
||||||
|
|
||||||
|
|||||||
@@ -23,3 +23,15 @@ fun DependencyHandler.publishedRuntime(
|
|||||||
): ExternalModuleDependency =
|
): ExternalModuleDependency =
|
||||||
addDependencyTo(this, "publishedRuntime", dependencyNotation, dependencyConfiguration)
|
addDependencyTo(this, "publishedRuntime", dependencyNotation, dependencyConfiguration)
|
||||||
|
|
||||||
|
|
||||||
|
val NamedDomainObjectContainer<Configuration>.publishedCompile: NamedDomainObjectProvider<Configuration> get() = named("publishedCompile")
|
||||||
|
|
||||||
|
fun DependencyHandler.publishedCompile(dependencyNotation: Any): Dependency? =
|
||||||
|
add("publishedCompile", dependencyNotation)
|
||||||
|
|
||||||
|
fun DependencyHandler.publishedCompile(
|
||||||
|
dependencyNotation: String,
|
||||||
|
dependencyConfiguration: Action<ExternalModuleDependency>
|
||||||
|
): ExternalModuleDependency =
|
||||||
|
addDependencyTo(this, "publishedCompile", dependencyNotation, dependencyConfiguration)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import org.jetbrains.kotlin.pill.PillExtension
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
maven
|
|
||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import org.jetbrains.kotlin.pill.PillExtension
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
maven
|
|
||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,16 @@
|
|||||||
import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer.COMPILE
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
maven
|
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
val mavenCompileScope by configurations.creating {
|
description = "Kotlin KLIB Library Commonizer"
|
||||||
the<MavenPluginConvention>()
|
|
||||||
.conf2ScopeMappings
|
publish()
|
||||||
.addMapping(0, this, COMPILE)
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
runtimeOnly.get().extendsFrom(compileOnly.get())
|
runtimeOnly.get().extendsFrom(compileOnly.get())
|
||||||
}
|
}
|
||||||
|
|
||||||
description = "Kotlin KLIB Library Commonizer"
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(project(":compiler:cli-common"))
|
compileOnly(project(":compiler:cli-common"))
|
||||||
compileOnly(project(":compiler:ir.serialization.common"))
|
compileOnly(project(":compiler:ir.serialization.common"))
|
||||||
@@ -27,7 +20,7 @@ dependencies {
|
|||||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
|
|
||||||
// This dependency is necessary to keep the right dependency record inside of POM file:
|
// This dependency is necessary to keep the right dependency record inside of POM file:
|
||||||
mavenCompileScope(project(":kotlin-compiler"))
|
publishedCompile(project(":kotlin-compiler"))
|
||||||
|
|
||||||
api(kotlinStdlib())
|
api(kotlinStdlib())
|
||||||
|
|
||||||
@@ -50,6 +43,4 @@ projectTest(parallel = true) {
|
|||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
|
|
||||||
publish()
|
|
||||||
|
|
||||||
standardPublicJars()
|
standardPublicJars()
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
description = "Kotlin compiler client embeddable"
|
description = "Kotlin compiler client embeddable"
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
maven
|
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user