Fix publication for jvm-abi-gen

Effectively solved by rearranging order of lines - runtimeJar() should
be used after publish(). Otherwise, jar task is not registered as
dependency for publication, and publication misses the main jar.

 #KTI-637 Fixed
This commit is contained in:
Nikolay Krasko
2021-09-08 16:00:28 +03:00
committed by TeamCityServer
parent 8924730320
commit 47a660e479
+12 -12
View File
@@ -7,6 +7,11 @@ plugins {
id("jps-compatible")
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
val shadows: Configuration by configurations.creating {
isTransitive = false
}
@@ -40,13 +45,11 @@ dependencies {
testImplementation(projectTests(":compiler:incremental-compilation-impl"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
publish()
noDefaultJar()
runtimeJar(tasks.register<ShadowJar>("shadowJar")) {
val shadowJar = runtimeJar(tasks.register<ShadowJar>("shadowJar")) {
callGroovy("manifestAttributes", manifest, project)
manifest.attributes["Implementation-Version"] = archiveVersion
@@ -56,17 +59,14 @@ runtimeJar(tasks.register<ShadowJar>("shadowJar")) {
mergeServiceFiles() // This is needed to relocate the services files for kotlinx.metadata
}
val test by tasks
test.dependsOn("shadowJar")
sourcesJar()
javadocJar()
projectTest(parallel = true) {
workingDir = rootDir
dependsOn(":dist")
dependsOn(shadowJar)
}
publish()
sourcesJar()
javadocJar()
testsJar()