Publish allopen compiler plugin separately

- added also 'kotlin-allopen-compiler-plugin-embeddable' to be used with
  'kotlin-compiler-embeddable'
- 'kotlin-maven-allopen' now just depends on
  'kotlin-allopen-compiler-plugin' instead of "embeding" it into itself

^KT-52811 In Progress
This commit is contained in:
Yahor Berdnikau
2023-03-20 17:38:40 +01:00
committed by Space Team
parent 64f8b87b66
commit 1ccd7afde7
6 changed files with 29 additions and 16 deletions
@@ -15,8 +15,6 @@ dependencies {
commonCompileOnly(project(":kotlin-compiler-embeddable")) commonCompileOnly(project(":kotlin-compiler-embeddable"))
commonCompileOnly(project(":kotlin-allopen-compiler-plugin")) commonCompileOnly(project(":kotlin-allopen-compiler-plugin"))
embedded(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
} }
gradlePlugin { gradlePlugin {
@@ -33,7 +33,7 @@ class AllOpenGradleSubplugin
return project.extensions.getByType(AllOpenExtension::class.java) return project.extensions.getByType(AllOpenExtension::class.java)
} }
private const val ALLOPEN_ARTIFACT_NAME = "kotlin-allopen" private const val ALLOPEN_ARTIFACT_NAME = "kotlin-allopen-compiler-plugin-embeddable"
private const val ANNOTATION_ARG_NAME = "annotation" private const val ANNOTATION_ARG_NAME = "annotation"
private const val PRESET_ARG_NAME = "preset" private const val PRESET_ARG_NAME = "preset"
+5 -13
View File
@@ -5,11 +5,6 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<properties> <properties>
<allopen.common.src>${basedir}/../../../plugins/allopen/allopen.common/src</allopen.common.src>
<allopen.k1.src>${basedir}/../../../plugins/allopen/allopen.k1/src</allopen.k1.src>
<allopen.k2.src>${basedir}/../../../plugins/allopen/allopen.k2/src</allopen.k2.src>
<allopen.cli.src>${basedir}/../../../plugins/allopen/allopen.cli/src</allopen.cli.src>
<allopen.resources>${basedir}/../../../plugins/allopen/allopen.cli/resources</allopen.resources>
<allopen.maven.plugin.src>${basedir}/src/main/kotlin</allopen.maven.plugin.src> <allopen.maven.plugin.src>${basedir}/src/main/kotlin</allopen.maven.plugin.src>
</properties> </properties>
@@ -37,6 +32,11 @@
<version>${project.version}</version> <version>${project.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-allopen-compiler-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId> <artifactId>maven-core</artifactId>
@@ -46,10 +46,6 @@
</dependencies> </dependencies>
<build> <build>
<resources>
<resource><directory>${allopen.resources}</directory></resource>
</resources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
@@ -60,10 +56,6 @@
<goals><goal>add-source</goal></goals> <goals><goal>add-source</goal></goals>
<configuration> <configuration>
<sources> <sources>
<source>${allopen.common.src}</source>
<source>${allopen.k1.src}</source>
<source>${allopen.k2.src}</source>
<source>${allopen.cli.src}</source>
<source>${allopen.maven.plugin.src}</source> <source>${allopen.maven.plugin.src}</source>
</sources> </sources>
</configuration> </configuration>
@@ -0,0 +1,19 @@
plugins {
id("org.jetbrains.kotlin.jvm")
}
dependencies {
embedded(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
}
publish {
artifactId = artifactId.replace(".", "-")
}
runtimeJar(rewriteDefaultJarDepsToShadedCompiler())
sourcesJarWithSourcesFromEmbedded(
project(":kotlin-allopen-compiler-plugin").tasks.named<Jar>("sourcesJar")
)
javadocJarWithJavadocFromEmbedded(
project(":kotlin-allopen-compiler-plugin").tasks.named<Jar>("javadocJar")
)
+2
View File
@@ -41,6 +41,8 @@ sourceSets {
} }
} }
publish()
runtimeJar() runtimeJar()
sourcesJar() sourcesJar()
javadocJar() javadocJar()
+2
View File
@@ -126,6 +126,7 @@ include ":benchmarks",
":kotlin-android-extensions-runtime" ":kotlin-android-extensions-runtime"
include ":kotlin-allopen-compiler-plugin", include ":kotlin-allopen-compiler-plugin",
":kotlin-allopen-compiler-plugin.embeddable",
":kotlin-allopen-compiler-plugin.common", ":kotlin-allopen-compiler-plugin.common",
":kotlin-allopen-compiler-plugin.k1", ":kotlin-allopen-compiler-plugin.k1",
":kotlin-allopen-compiler-plugin.k2", ":kotlin-allopen-compiler-plugin.k2",
@@ -665,6 +666,7 @@ project(':kotlin-parcelize-compiler').projectDir = "$rootDir/prepare/parcelize-c
project(':kotlin-android-extensions-runtime').projectDir = "$rootDir/plugins/android-extensions/android-extensions-runtime" as File project(':kotlin-android-extensions-runtime').projectDir = "$rootDir/plugins/android-extensions/android-extensions-runtime" as File
project(':kotlin-allopen-compiler-plugin').projectDir = "$rootDir/plugins/allopen" as File project(':kotlin-allopen-compiler-plugin').projectDir = "$rootDir/plugins/allopen" as File
project(":kotlin-allopen-compiler-plugin.embeddable").projectDir = "$rootDir/plugins/allopen/allopen.embeddable" as File
project(':kotlin-allopen-compiler-plugin.common').projectDir = "$rootDir/plugins/allopen/allopen.common" as File project(':kotlin-allopen-compiler-plugin.common').projectDir = "$rootDir/plugins/allopen/allopen.common" as File
project(':kotlin-allopen-compiler-plugin.k1').projectDir = "$rootDir/plugins/allopen/allopen.k1" as File project(':kotlin-allopen-compiler-plugin.k1').projectDir = "$rootDir/plugins/allopen/allopen.k1" as File
project(':kotlin-allopen-compiler-plugin.k2').projectDir = "$rootDir/plugins/allopen/allopen.k2" as File project(':kotlin-allopen-compiler-plugin.k2').projectDir = "$rootDir/plugins/allopen/allopen.k2" as File