From 47a660e47982bf044ae0ab0c65074c753fc93841 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Wed, 8 Sep 2021 16:00:28 +0300 Subject: [PATCH] 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 --- plugins/jvm-abi-gen/build.gradle.kts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/jvm-abi-gen/build.gradle.kts b/plugins/jvm-abi-gen/build.gradle.kts index 8a183d092eb..da745ba8e70 100644 --- a/plugins/jvm-abi-gen/build.gradle.kts +++ b/plugins/jvm-abi-gen/build.gradle.kts @@ -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")) { + +val shadowJar = runtimeJar(tasks.register("shadowJar")) { callGroovy("manifestAttributes", manifest, project) manifest.attributes["Implementation-Version"] = archiveVersion @@ -56,17 +59,14 @@ runtimeJar(tasks.register("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() \ No newline at end of file