Declare global protobuf-java in Java Platform Plugin

The constraints in the platform module apply to all libraries (including
to transitively included libraries).
This commit is contained in:
Alva Swanson 2023-07-02 18:28:25 +02:00
parent 4cf54cd5e0
commit 78a742695c
No known key found for this signature in database
GPG Key ID: 004760E77F753090
4 changed files with 17 additions and 10 deletions

View File

@ -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
@ -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
@ -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
@ -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) {
@ -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) {
@ -223,6 +221,7 @@ configure(project(':core')) {
}
dependencies {
implementation enforcedPlatform(project(':platform'))
implementation project(':proto')
implementation project(':assets')
implementation project(':common')
@ -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
@ -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) {
@ -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')
@ -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
@ -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) {
@ -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')
@ -465,6 +462,7 @@ configure(project(':apitest')) {
}
dependencies {
implementation enforcedPlatform(project(':platform'))
implementation project(':proto')
implementation project(':common')
implementation project(':core')
@ -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
@ -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) {

9
platform/build.gradle Normal file
View File

@ -0,0 +1,9 @@
plugins {
id 'java-platform'
}
dependencies {
constraints {
api libs.protobuf.java
}
}

View File

@ -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

View File

@ -16,5 +16,6 @@ include 'desktop'
include 'seednode'
include 'statsnode'
include 'apitest'
include 'platform'
rootProject.name = 'bisq'