Skip to content

Commit

Permalink
chore(build): Add fat jar and distributions to CLI build (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
adesjardin authored Aug 15, 2023
1 parent b357fe2 commit e78540b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repositories {
dependencies {
implementation 'de.benediktritter.maven-plugin-development:de.benediktritter.maven-plugin-development.gradle.plugin:0.4.2'
implementation 'net.thauvin.erik.gradle.semver:net.thauvin.erik.gradle.semver.gradle.plugin:1.0.4'
implementation 'com.github.johnrengelman:shadow:8.1.1'
testImplementation platform("org.spockframework:spock-bom:2.2-groovy-3.0")
testImplementation 'org.spockframework:spock-core'
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ plugins {
id 'mule-linter.groovy-common-conventions'
id 'mule-linter.maven-publish-conventions'
id 'application'
id 'com.github.johnrengelman.shadow'
}
7 changes: 4 additions & 3 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ project:
- Kevin King
- Manik Magar
license: BSD-2-Clause
inceptionYear: 2020
inceptionYear: '2020'
tags:
- maven
- linter
- mule
java:
groupId: com.avioconsulting.mule
version: 8
version: '8'

release:
github:
Expand Down Expand Up @@ -88,4 +88,5 @@ deploy:
distributions:
mule-linter:
artifacts:
- path: mule-linter-cli/build/libs/mule-linter-cli-{{projectVersion}}.jar
- path: mule-linter-cli/build/distributions/mule-linter-cli-{{projectVersion}}.tar
- path: mule-linter-cli/build/distributions/mule-linter-cli-{{projectVersion}}.zip
18 changes: 18 additions & 0 deletions mule-linter-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,21 @@ dependencies {
application {
mainClass = 'com.avioconsulting.mule.linter.MuleLinterCli'
}

publish.dependsOn(shadowDistTar)
publish.dependsOn(shadowDistZip)

tasks.register('renameDists', Sync) {
from('build/distributions/')
into('build/distributions/')
include '*.tar'
include '*.zip'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
rename { String filename ->
filename.replace("-shadow", "")
}
}

renameDists.dependsOn(shadowDistTar)
renameDists.dependsOn(shadowDistZip)
publish.dependsOn(renameDists)

0 comments on commit e78540b

Please sign in to comment.