Skip to content

Commit

Permalink
Declare global protobuf-java in Java Platform Plugin
Browse files Browse the repository at this point in the history
The constraints in the platform module apply to all libraries (including
to transitively included libraries).
  • Loading branch information
alvasw committed Jul 6, 2023
1 parent 4cf54cd commit 78a7426
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
16 changes: 6 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ configure(project(':common')) {
"Implementation-Version": getHash())

dependencies {
implementation enforcedPlatform(project(':platform'))
implementation project(':proto')
annotationProcessor libs.lombok
compileOnly libs.javax.annotation
Expand All @@ -142,7 +143,6 @@ configure(project(':common')) {
exclude(module: 'jsr305')
exclude(module: 'okhttp')
exclude(module: 'okio')
exclude(module: 'protobuf-java')
exclude(module: 'slf4j-api')
}
implementation libs.google.findbugs
Expand All @@ -151,7 +151,6 @@ configure(project(':common')) {
implementation(libs.google.guice) {
exclude(module: 'guava')
}
implementation libs.protobuf.java
implementation libs.commons.io
implementation libs.jopt
implementation libs.apache.commons.lang3
Expand All @@ -176,12 +175,12 @@ configure(project(':p2p')) {
}

dependencies {
implementation enforcedPlatform(project(':platform'))
implementation project(':proto')
implementation project(':common')
annotationProcessor libs.lombok
compileOnly libs.lombok
implementation libs.google.guava
implementation libs.protobuf.java
implementation libs.fxmisc.easybind
implementation libs.slf4j.api
implementation(libs.netlayer.tor.external) {
Expand All @@ -196,7 +195,6 @@ configure(project(':p2p')) {
exclude(module: 'jsr305')
exclude(module: 'okhttp')
exclude(module: 'okio')
exclude(module: 'protobuf-java')
exclude(module: 'slf4j-api')
}
implementation(libs.google.guice) {
Expand All @@ -223,6 +221,7 @@ configure(project(':core')) {
}

dependencies {
implementation enforcedPlatform(project(':platform'))
implementation project(':proto')
implementation project(':assets')
implementation project(':common')
Expand All @@ -237,7 +236,6 @@ configure(project(':core')) {
implementation libs.google.findbugs
implementation libs.google.gson
implementation libs.google.guava
implementation libs.protobuf.java
implementation libs.commons.codec
implementation libs.commons.io
implementation libs.jopt
Expand All @@ -261,7 +259,6 @@ configure(project(':core')) {
exclude(module: 'jsr305')
exclude(module: 'okhttp')
exclude(module: 'okio')
exclude(module: 'protobuf-java')
exclude(module: 'slf4j-api')
}
implementation(libs.jsonrpc4j) {
Expand Down Expand Up @@ -313,6 +310,7 @@ configure(project(':desktop')) {
sourceSets.main.resources.srcDirs += ['src/main/java'] // to copy fxml and css files

dependencies {
implementation enforcedPlatform(project(':platform'))
implementation project(':assets')
implementation project(':common')
implementation project(':proto')
Expand All @@ -324,7 +322,6 @@ configure(project(':desktop')) {
implementation libs.logback.core
implementation libs.google.gson
implementation libs.google.guava
implementation libs.protobuf.java
implementation libs.jcsv
implementation libs.jfoenix
implementation libs.commons.io
Expand All @@ -343,7 +340,6 @@ configure(project(':desktop')) {
exclude(module: 'jsr305')
exclude(module: 'okhttp')
exclude(module: 'okio')
exclude(module: 'protobuf-java')
exclude(module: 'slf4j-api')
}
implementation(libs.google.guice) {
Expand Down Expand Up @@ -373,6 +369,7 @@ configure(project(':seednode')) {
mainClassName = 'bisq.seednode.SeedNodeMain'

dependencies {
implementation enforcedPlatform(project(':platform'))
implementation project(':common')
implementation project(':proto')
implementation project(':p2p')
Expand Down Expand Up @@ -465,6 +462,7 @@ configure(project(':apitest')) {
}

dependencies {
implementation enforcedPlatform(project(':platform'))
implementation project(':proto')
implementation project(':common')
implementation project(':core')
Expand All @@ -479,7 +477,6 @@ configure(project(':apitest')) {
implementation libs.logback.core
implementation libs.google.gson
implementation libs.google.guava
implementation libs.protobuf.java
implementation libs.jopt
implementation libs.apache.commons.lang3
implementation libs.slf4j.api
Expand All @@ -489,7 +486,6 @@ configure(project(':apitest')) {
exclude(module: 'jsr305')
exclude(module: 'okhttp')
exclude(module: 'okio')
exclude(module: 'protobuf-java')
exclude(module: 'slf4j-api')
}
implementation(libs.grpc.protobuf) {
Expand Down
9 changes: 9 additions & 0 deletions platform/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
id 'java-platform'
}

dependencies {
constraints {
api libs.protobuf.java
}
}
1 change: 1 addition & 0 deletions proto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
apply plugin: 'com.google.protobuf'

dependencies {
implementation enforcedPlatform(project(':platform'))
annotationProcessor libs.lombok
compileOnly libs.javax.annotation
compileOnly libs.lombok
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ include 'desktop'
include 'seednode'
include 'statsnode'
include 'apitest'
include 'platform'

rootProject.name = 'bisq'

0 comments on commit 78a7426

Please sign in to comment.