Change kotlin-assignment plugin to use published compiler plugin

^KT-52811 In Progress
This commit is contained in:
Yahor Berdnikau
2023-03-20 17:43:03 +01:00
committed by Space Team
parent 1ccd7afde7
commit 5e41cbda75
3 changed files with 9 additions and 27 deletions
@@ -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")
)