Skip to content

Commit 5e41cbd

Browse files
TapchicomaSpace Team
authored and
Space Team
committed
Change kotlin-assignment plugin to use published compiler plugin
^KT-52811 In Progress
1 parent 1ccd7af commit 5e41cbd

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

libraries/tools/kotlin-assignment/build.gradle.kts

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ dependencies {
1616
commonCompileOnly(project(":compiler"))
1717
commonCompileOnly(project(":kotlin-assignment-compiler-plugin"))
1818

19-
embedded(project(":kotlin-assignment-compiler-plugin")) { isTransitive = false }
20-
2119
testImplementation(commonDependency("junit"))
2220
}
2321

libraries/tools/kotlin-assignment/src/common/kotlin/org/jetbrains/kotlin/assignment/plugin/gradle/AssignmentSubplugin.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AssignmentSubplugin
1818
) : KotlinCompilerPluginSupportPlugin {
1919

2020
companion object {
21-
const val COMPILER_PLUGIN_ARTIFACT_NAME = "kotlin-assignment"
21+
const val COMPILER_PLUGIN_ARTIFACT_NAME = "kotlin-assignment-compiler-plugin-embeddable"
2222
const val COMPILER_PLUGIN_ID = "org.jetbrains.kotlin.assignment"
2323
private const val ANNOTATION_ARG_NAME = "annotation"
2424
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.gradle.kotlin.dsl.support.serviceOf
2-
31
description = "Kotlin Assignment Compiler Plugin (Embeddable)"
42

53
plugins {
@@ -11,28 +9,14 @@ dependencies {
119
embedded(project(":kotlin-assignment-compiler-plugin")) { isTransitive = false }
1210
}
1311

14-
sourceSets {
15-
"main" { none() }
16-
"test" { none() }
17-
}
18-
19-
val runtimeJar = runtimeJar(rewriteDefaultJarDepsToShadedCompiler())
20-
21-
val sourcesJar = sourcesJar {
22-
val compilerTask = project(":kotlin-assignment-compiler-plugin").tasks.named<Jar>("sourcesJar")
23-
dependsOn(compilerTask)
24-
val archiveOperations = serviceOf<ArchiveOperations>()
25-
from(compilerTask.map { it.archiveFile }.map { archiveOperations.zipTree(it) })
26-
}
27-
28-
val javadocJar = javadocJar {
29-
val compilerTask = project(":kotlin-assignment-compiler-plugin").tasks.named<Jar>("javadocJar")
30-
dependsOn(compilerTask)
31-
val archiveOperations = serviceOf<ArchiveOperations>()
32-
from(compilerTask.map { it.archiveFile }.map { archiveOperations.zipTree(it) })
33-
}
34-
3512
publish {
3613
artifactId = artifactId.replace(".", "-")
37-
setArtifacts(listOf(runtimeJar, sourcesJar, javadocJar))
3814
}
15+
16+
runtimeJar(rewriteDefaultJarDepsToShadedCompiler())
17+
sourcesJarWithSourcesFromEmbedded(
18+
project(":kotlin-assignment-compiler-plugin").tasks.named<Jar>("sourcesJar")
19+
)
20+
javadocJarWithJavadocFromEmbedded(
21+
project(":kotlin-assignment-compiler-plugin").tasks.named<Jar>("javadocJar")
22+
)

0 commit comments

Comments
 (0)