Build: Remove artifact configuration out of lazy lambda
It may not be executed leading to misconfiguration
This commit is contained in:
@@ -54,7 +54,7 @@ if (deployVersion != null) {
|
||||
|
||||
noDefaultJar()
|
||||
|
||||
tasks.register<ShadowJar>("shadowJar") {
|
||||
val shadowJar = tasks.register<ShadowJar>("shadowJar") {
|
||||
callGroovy("manifestAttributes", manifest, project)
|
||||
manifest.attributes["Implementation-Version"] = version
|
||||
|
||||
@@ -62,12 +62,10 @@ tasks.register<ShadowJar>("shadowJar") {
|
||||
exclude("**/*.proto")
|
||||
configurations = listOf(shadows)
|
||||
relocate("org.jetbrains.kotlin", "kotlinx.metadata.internal")
|
||||
|
||||
val artifactRef = outputs.files.singleFile
|
||||
runtimeJarArtifactBy(this, artifactRef)
|
||||
addArtifact("runtime", this, artifactRef)
|
||||
}
|
||||
|
||||
runtimeJarArtifactBy(shadowJar, shadowJar)
|
||||
|
||||
val test by tasks
|
||||
test.dependsOn("shadowJar")
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ if (deployVersion != null) {
|
||||
|
||||
noDefaultJar()
|
||||
|
||||
tasks.register<ShadowJar>("shadowJar") {
|
||||
val shadowJar = tasks.register<ShadowJar>("shadowJar") {
|
||||
callGroovy("manifestAttributes", manifest, project)
|
||||
manifest.attributes["Implementation-Version"] = version
|
||||
|
||||
@@ -52,12 +52,10 @@ tasks.register<ShadowJar>("shadowJar") {
|
||||
exclude("**/*.proto")
|
||||
configurations = listOf(shadows)
|
||||
relocate("org.jetbrains.kotlin", "kotlinx.metadata.internal")
|
||||
|
||||
val artifactRef = outputs.files.singleFile
|
||||
runtimeJarArtifactBy(this, artifactRef)
|
||||
addArtifact("runtime", this, artifactRef)
|
||||
}
|
||||
|
||||
runtimeJarArtifactBy(shadowJar, shadowJar)
|
||||
|
||||
sourcesJar {
|
||||
for (dependency in shadows.dependencies) {
|
||||
if (dependency is ProjectDependency) {
|
||||
|
||||
Reference in New Issue
Block a user