From 9e1bf91e5197a741631898fd24355239e79a20ea Mon Sep 17 00:00:00 2001 From: phinner <62483793+Phinner@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:28:24 +0100 Subject: [PATCH] feat(build): Added task for CI --- .../kotlin/distributor.parent-conventions.gradle.kts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/distributor-build-logic/src/main/kotlin/distributor.parent-conventions.gradle.kts b/distributor-build-logic/src/main/kotlin/distributor.parent-conventions.gradle.kts index 47b3d320..d11166fc 100644 --- a/distributor-build-logic/src/main/kotlin/distributor.parent-conventions.gradle.kts +++ b/distributor-build-logic/src/main/kotlin/distributor.parent-conventions.gradle.kts @@ -1,4 +1,6 @@ import com.diffplug.gradle.spotless.SpotlessExtensionPredeclare +import com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { id("com.diffplug.spotless") @@ -34,3 +36,10 @@ tasks.dependencyUpdates { isNonStable(candidate.version) && !isNonStable(currentVersion) } } + +tasks.register("dist") { + dependsOn(tasks.build) + from(rootProject.subprojects.filter { it.plugins.hasPlugin(ShadowJavaPlugin::class) }.map { it.tasks.named("shadowJar") }) + into(temporaryDir) + rename { it.replace("-${rootProject.version}-plugin", "") } +}