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", "") } +}