Skip to content

Commit

Permalink
Add the Automatic-Module-Name for each project. (ReactiveX#426)
Browse files Browse the repository at this point in the history
Until proper support for modules is introduced,
this commit adds the Automatic-Module-Name to every
produces .jar file.
  • Loading branch information
123Haynes authored and RobWin committed Apr 13, 2019
1 parent 033f5c9 commit 1761bda
Show file tree
Hide file tree
Showing 24 changed files with 50 additions and 16 deletions.
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ subprojects {
property "sonar.jacoco.reportPaths", allTestCoverageFile
}
}
afterEvaluate {
// exclude subprojects that don't produce a jar file.
if(!project.name.equals('resilience4j-bom') && !project.name.equals('resilience4j-documentation') && !project.name.equals('resilience4j-test')) {
jar {
inputs.property('moduleName', moduleName)
manifest.attributes(
'Automatic-Module-Name': moduleName
)
}
}
}
}

tasks.check.dependsOn tasks.jacocoTestReport
Expand Down
3 changes: 2 additions & 1 deletion resilience4j-all/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ dependencies {
compile project(':resilience4j-cache')
compile project(':resilience4j-timelimiter')
testCompile project(':resilience4j-test')
}
}
ext.moduleName='io.github.resilience4j.all'
3 changes: 2 additions & 1 deletion resilience4j-annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dependencies {
compileOnly project(':resilience4j-circuitbreaker')
compileOnly project(':resilience4j-ratelimiter')
}
}
ext.moduleName='io.github.resilience4j.annotations'
3 changes: 2 additions & 1 deletion resilience4j-bulkhead/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dependencies {
testCompile project(':resilience4j-rxjava2')
jmh project(':resilience4j-rxjava2')
testCompile ( libraries.rxjava2)
}
}
ext.moduleName='io.github.resilience4j.bulkhead'
3 changes: 2 additions & 1 deletion resilience4j-cache/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dependencies {
compile ( libraries.jcache)
testCompile project(':resilience4j-rxjava2')
testCompile ( libraries.rxjava2)
}
}
ext.moduleName='io.github.resilience4j.cache'
3 changes: 2 additions & 1 deletion resilience4j-circuitbreaker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dependencies {
testCompile project(':resilience4j-test')
jmh project(':resilience4j-rxjava2')
testCompile ( libraries.rxjava2 )
}
}
ext.moduleName='io.github.resilience4j.circuitbreaker'
1 change: 1 addition & 0 deletions resilience4j-circularbuffer/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ext.moduleName='io.github.resilience4j.circularbuffer'
3 changes: 2 additions & 1 deletion resilience4j-consumer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ dependencies {
compile project(':resilience4j-core')
compile project(':resilience4j-circularbuffer')
testCompile project(':resilience4j-circuitbreaker')
}
}
ext.moduleName='io.github.resilience4j.consumer'
1 change: 1 addition & 0 deletions resilience4j-core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ext.moduleName='io.github.resilience4j.core'
3 changes: 2 additions & 1 deletion resilience4j-feign/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dependencies {
compile project(':resilience4j-ratelimiter')
testCompile ( libraries.feign_wiremock )
testCompile ( libraries.feign )
}
}
ext.moduleName='io.github.resilience4j.feign'
1 change: 1 addition & 0 deletions resilience4j-metrics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ dependencies {
testCompile project(':resilience4j-circuitbreaker')
testCompile (libraries.metrics)
}
ext.moduleName='io.github.resilience4j.metrics'
3 changes: 2 additions & 1 deletion resilience4j-micrometer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ dependencies {
testCompile project(':resilience4j-test')
testCompile project(':resilience4j-circuitbreaker')
testCompile (libraries.micrometer)
}
}
ext.moduleName='io.github.resilience4j.micrometer'
1 change: 1 addition & 0 deletions resilience4j-prometheus/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dependencies {
testCompile project(':resilience4j-bulkhead')
testCompile (libraries.prometheus_simpleclient)
}
ext.moduleName='io.github.resilience4j.prometheus'
3 changes: 2 additions & 1 deletion resilience4j-ratelimiter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dependencies {
compile project(':resilience4j-core')
}
}
ext.moduleName='io.github.resilience4j.ratelimiter'
1 change: 1 addition & 0 deletions resilience4j-ratpack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ dependencies {
testCompile project(':resilience4j-metrics')
testCompile ( libraries.ratpack )
}
ext.moduleName='io.github.resilience4j.ratpack'
3 changes: 2 additions & 1 deletion resilience4j-reactor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ dependencies {
testCompile (libraries.reactor_test)
testCompile (libraries.assertj)
testCompile (libraries.reactive_streams_tck)
}
}
ext.moduleName='io.github.resilience4j.reactor'
3 changes: 2 additions & 1 deletion resilience4j-retrofit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ dependencies {
testCompile ( libraries.retrofit_test )
testCompile ( libraries.retrofit_wiremock )
testCompile ( libraries.retrofit )
}
}
ext.moduleName='io.github.resilience4j.retrofit'
3 changes: 2 additions & 1 deletion resilience4j-retry/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dependencies {
testCompile project(':resilience4j-test')
testCompile project(':resilience4j-rxjava2')
testCompile ( libraries.rxjava2)
}
}
ext.moduleName='io.github.resilience4j.retry'
3 changes: 2 additions & 1 deletion resilience4j-rxjava2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ dependencies {
testCompile project(':resilience4j-bulkhead')
testCompile project(':resilience4j-retry')
testCompile ( libraries.rxjava2)
}
}
ext.moduleName='io.github.resilience4j.rxjava2'
1 change: 1 addition & 0 deletions resilience4j-spring-boot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ dependencies {
}

compileJava.dependsOn(processResources)
ext.moduleName='io.github.resilience4j.springboot'
3 changes: 2 additions & 1 deletion resilience4j-spring-boot2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ dependencies {
testCompile(libraries.spring_boot2_actuator)
}

compileJava.dependsOn(processResources)
compileJava.dependsOn(processResources)
ext.moduleName='io.github.resilience4j.springboot2'
1 change: 1 addition & 0 deletions resilience4j-spring/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ dependencies {
testCompile project(':resilience4j-prometheus')
testCompile project(':resilience4j-metrics')
}
ext.moduleName='io.github.resilience4j.spring'
3 changes: 2 additions & 1 deletion resilience4j-timelimiter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dependencies {

}
}
ext.moduleName='io.github.resilience4j.timelimiter'
3 changes: 2 additions & 1 deletion resilience4j-vertx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dependencies {
compile project(':resilience4j-circuitbreaker')
testCompile ( libraries.vertx_unit)
testCompile ( libraries.vertx)
}
}
ext.moduleName='io.github.resilience4j.vertx'

0 comments on commit 1761bda

Please sign in to comment.