Change kotlin-assignment plugin to use published compiler plugin
^KT-52811 In Progress
This commit is contained in:
committed by
Space Team
parent
1ccd7afde7
commit
5e41cbda75
@@ -16,8 +16,6 @@ dependencies {
|
||||
commonCompileOnly(project(":compiler"))
|
||||
commonCompileOnly(project(":kotlin-assignment-compiler-plugin"))
|
||||
|
||||
embedded(project(":kotlin-assignment-compiler-plugin")) { isTransitive = false }
|
||||
|
||||
testImplementation(commonDependency("junit"))
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ class AssignmentSubplugin
|
||||
) : KotlinCompilerPluginSupportPlugin {
|
||||
|
||||
companion object {
|
||||
const val COMPILER_PLUGIN_ARTIFACT_NAME = "kotlin-assignment"
|
||||
const val COMPILER_PLUGIN_ARTIFACT_NAME = "kotlin-assignment-compiler-plugin-embeddable"
|
||||
const val COMPILER_PLUGIN_ID = "org.jetbrains.kotlin.assignment"
|
||||
private const val ANNOTATION_ARG_NAME = "annotation"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import org.gradle.kotlin.dsl.support.serviceOf
|
||||
|
||||
description = "Kotlin Assignment Compiler Plugin (Embeddable)"
|
||||
|
||||
plugins {
|
||||
@@ -11,28 +9,14 @@ dependencies {
|
||||
embedded(project(":kotlin-assignment-compiler-plugin")) { isTransitive = false }
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { none() }
|
||||
"test" { none() }
|
||||
}
|
||||
|
||||
val runtimeJar = runtimeJar(rewriteDefaultJarDepsToShadedCompiler())
|
||||
|
||||
val sourcesJar = sourcesJar {
|
||||
val compilerTask = project(":kotlin-assignment-compiler-plugin").tasks.named<Jar>("sourcesJar")
|
||||
dependsOn(compilerTask)
|
||||
val archiveOperations = serviceOf<ArchiveOperations>()
|
||||
from(compilerTask.map { it.archiveFile }.map { archiveOperations.zipTree(it) })
|
||||
}
|
||||
|
||||
val javadocJar = javadocJar {
|
||||
val compilerTask = project(":kotlin-assignment-compiler-plugin").tasks.named<Jar>("javadocJar")
|
||||
dependsOn(compilerTask)
|
||||
val archiveOperations = serviceOf<ArchiveOperations>()
|
||||
from(compilerTask.map { it.archiveFile }.map { archiveOperations.zipTree(it) })
|
||||
}
|
||||
|
||||
publish {
|
||||
artifactId = artifactId.replace(".", "-")
|
||||
setArtifacts(listOf(runtimeJar, sourcesJar, javadocJar))
|
||||
}
|
||||
|
||||
runtimeJar(rewriteDefaultJarDepsToShadedCompiler())
|
||||
sourcesJarWithSourcesFromEmbedded(
|
||||
project(":kotlin-assignment-compiler-plugin").tasks.named<Jar>("sourcesJar")
|
||||
)
|
||||
javadocJarWithJavadocFromEmbedded(
|
||||
project(":kotlin-assignment-compiler-plugin").tasks.named<Jar>("javadocJar")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user