From 65595897b360bf11ecd3ee8e15924e74b8996609 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Wed, 12 Jul 2023 13:01:25 +0200 Subject: [PATCH] Support Bisq upstream code - Declare bisqLibs version catalog that points to the upstream version catalog - Create platform module to enforce transitive dependency versions --- build.gradle | 22 ++++++++++++---------- gradle/libs.versions.toml | 13 ------------- platform/build.gradle | 13 +++++++++++++ settings.gradle | 12 +++++++++++- 4 files changed, 36 insertions(+), 24 deletions(-) create mode 100644 platform/build.gradle diff --git a/build.gradle b/build.gradle index 2e676da..a178716 100644 --- a/build.gradle +++ b/build.gradle @@ -34,28 +34,30 @@ configurations.all { } dependencies { + implementation enforcedPlatform(project(':platform')) + implementation 'bisq:assets' implementation 'bisq:common' implementation 'bisq:core' implementation 'bisq:p2p' implementation libs.chimp.jsocks - implementation libs.fxmisc.easybind + implementation bisqLibs.fxmisc.easybind implementation libs.glassfish.jaxb - implementation libs.guava - implementation libs.guice + implementation bisqLibs.google.guava + implementation bisqLibs.google.guice implementation libs.bundles.jersey.libs implementation libs.swagger - implementation libs.logback.core - implementation libs.logback.classic - compileOnly libs.lombok - annotationProcessor libs.lombok - implementation libs.slf4j.api + implementation bisqLibs.logback.core + implementation bisqLibs.logback.classic + compileOnly bisqLibs.lombok + annotationProcessor bisqLibs.lombok + implementation bisqLibs.slf4j.api - testAnnotationProcessor libs.lombok - testCompileOnly libs.lombok + testAnnotationProcessor bisqLibs.lombok + testCompileOnly bisqLibs.lombok testImplementation libs.junit.jupiter } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 422a243..6d24392 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,16 +5,10 @@ # when multiple versions are attempted to be brought in as transitive dependencies of other requirements. [versions] chimp-jsocks-lib = { strictly = '567e1cd6' } -fxmisc-easybind-lib = { strictly = '1.0.3' } glassfish-jaxb-lib = { strictly = '3.0.2' } -guava-lib = { strictly = '30.1.1-jre' } -guice-lib = { strictly = '5.0.1' } jersey-lib = { strictly = '3.0.4' } junit-jupiter-lib = { strictly = '5.8.2' } -logback-lib = { strictly = '1.2.6' } -lombok-lib = { strictly = '1.18.22' } openjfx-plugin = { strictly = '0.0.12' } -slf4j-lib = { strictly = '1.7.36' } shadow-plugin = { strictly = '5.2.0' } swagger-lib = { strictly = '2.2.0' } @@ -23,18 +17,11 @@ swagger-lib = { strictly = '2.2.0' } # in a build.gradle ('implementation libs.protobuf.java') [libraries] chimp-jsocks = { module = 'com.github.chimp1984:jsocks', version.ref = 'chimp-jsocks-lib' } -fxmisc-easybind = { module = 'org.fxmisc.easybind:easybind', version.ref = 'fxmisc-easybind-lib' } -guava = { module = 'com.google.guava:guava', version.ref = 'guava-lib' } -guice = { module = 'com.google.inject:guice', version.ref = 'guice-lib' } jersey-container-jdk-http = { module = 'org.glassfish.jersey.containers:jersey-container-jdk-http', version.ref = 'jersey-lib' } jersey-media-json-jackson = { module = 'org.glassfish.jersey.media:jersey-media-json-jackson', version.ref = 'jersey-lib' } jersey-inject-jersey-hk2 = { module = 'org.glassfish.jersey.inject:jersey-hk2', version.ref = 'jersey-lib' } glassfish-jaxb = { module = 'org.glassfish.jaxb:jaxb-runtime', version.ref = 'glassfish-jaxb-lib' } junit-jupiter = { module = 'org.junit.jupiter:junit-jupiter', version.ref = 'junit-jupiter-lib' } -logback-core = { module = 'ch.qos.logback:logback-core', version.ref = 'logback-lib' } -logback-classic = { module = 'ch.qos.logback:logback-classic', version.ref = 'logback-lib' } -lombok = { module = 'org.projectlombok:lombok', version.ref = 'lombok-lib' } -slf4j-api = { module = 'org.slf4j:slf4j-api', version.ref = 'slf4j-lib' } swagger = { module = 'io.swagger.core.v3:swagger-jaxrs2-jakarta', version.ref = 'swagger-lib' } [bundles] diff --git a/platform/build.gradle b/platform/build.gradle new file mode 100644 index 0000000..0d859c1 --- /dev/null +++ b/platform/build.gradle @@ -0,0 +1,13 @@ +plugins { + id 'java-platform' +} + +dependencies { + constraints { + api 'org.apache.commons:commons-lang3:3.11' + + api 'com.fasterxml.jackson.core:jackson-annotations:2.12.1' + api 'com.fasterxml.jackson.core:jackson-core:2.12.1' + api 'com.fasterxml.jackson.core:jackson-databind:2.12.1' + } +} diff --git a/settings.gradle b/settings.gradle index d59f7d7..ef18c65 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,6 +4,16 @@ pluginManagement { } includeBuild('bisq-gradle') } + rootProject.name = 'bisq-daonode' -includeBuild('bisq') +dependencyResolutionManagement { + versionCatalogs { + bisqLibs { + from(files('bisq/gradle/libs.versions.toml')) + } + } +} + +includeBuild('bisq') +include 'platform'