Skip to content

Commit

Permalink
feat(build): Added task for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Mar 14, 2024
1 parent c91b4e7 commit 9e1bf91
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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")
Expand Down Expand Up @@ -34,3 +36,10 @@ tasks.dependencyUpdates {
isNonStable(candidate.version) && !isNonStable(currentVersion)
}
}

tasks.register<Copy>("dist") {
dependsOn(tasks.build)
from(rootProject.subprojects.filter { it.plugins.hasPlugin(ShadowJavaPlugin::class) }.map { it.tasks.named<ShadowJar>("shadowJar") })
into(temporaryDir)
rename { it.replace("-${rootProject.version}-plugin", "") }
}

0 comments on commit 9e1bf91

Please sign in to comment.