Skip to content

Commit

Permalink
build: Only using shaded jar
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Ruaux committed Feb 9, 2023
1 parent 4caae83 commit 079fe75
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
8 changes: 5 additions & 3 deletions core/redis-smart-cache-jdbc/redis-smart-cache-jdbc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ jar {

jar.finalizedBy shadowJar

shadowJar {
archiveClassifier.set('')
}

import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation

task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = "com.redis.smartcache.shaded"
}

tasks.shadowJar.dependsOn tasks.relocateShadowJar
tasks.distTar.dependsOn tasks.shadowJar
tasks.distZip.dependsOn tasks.shadowJar
tasks.shadowJar.dependsOn tasks.relocateShadowJar
2 changes: 1 addition & 1 deletion demo/redis-smart-cache-demo/redis-smart-cache-demo.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
implementation project(':redis-smart-cache-jdbc')
implementation project(':redis-smart-cache-jdbc')
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation group: 'com.redis', name: 'spring-lettucemod', version: lettucemodVersion
implementation group: 'com.github.javafaker', name: 'javafaker', version: fakerVersion
Expand Down
8 changes: 2 additions & 6 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,8 @@ announce:
distributions:
redis-smart-cache-jdbc:
artifacts:
- path: 'core/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.tar'
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.tar'
- path: 'core/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip'
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'
- path: 'core/{{distributionName}}/build/libs/{{distributionName}}-{{projectVersion}}-all.jar'
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}-all.jar'
- path: 'core/{{distributionName}}/build/libs/{{distributionName}}-{{projectVersion}}.jar'
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.jar'
redis-smart-cache-demo:
type: SINGLE_JAR
executable:
Expand Down
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ projects {
id 'io.spring.dependency-management'
}
path(':redis-smart-cache-jdbc') {
id 'java-library-distribution'
id 'com.github.johnrengelman.shadow'
}
path(':redis-smart-cache-test') {
Expand Down

0 comments on commit 079fe75

Please sign in to comment.