Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle: Add all libraries to central version catalog #321

Merged
merged 1 commit into from
May 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ application {
apply plugin: "org.springframework.boot"
apply plugin: 'io.spring.dependency-management'

ext {
jacksonVersion = '2.13.2'
springWsVersion = '5.3.19'
springBootVersion = '2.6.6'
}
dependencies {
api platform(project(':platforms:common-platform'))

Expand All @@ -49,16 +44,9 @@ dependencies {
implementation("bisq.wallets:api")

implementation libs.google.guava
implementation libs.bundles.jackson
implementation libs.protobuf.java.util

implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")

implementation 'com.google.protobuf:protobuf-java-util:3.20.0'

implementation 'org.springframework.boot:spring-boot-starter-web:2.5.6'
implementation 'io.springfox:springfox-boot-starter:3.0.0'

implementation 'io.springfox:springfox-swagger2:3.0.0'
implementation 'io.springfox:springfox-swagger-ui:3.0.0'
implementation libs.spring.boot.starter.web
implementation libs.bundles.springfox.libs
}
11 changes: 2 additions & 9 deletions bisq1bridge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ application {
project.mainClassName = 'bisq.bisq1bridge.Bisq1bridgeMain'
}

ext {
jacksonVersion = '2.13.2'
}

run {
// Pass command-line properties to application
// Normally they'd only be applied to the gradle process, but we need them in the started application
Expand All @@ -37,10 +33,7 @@ dependencies {
implementation libs.google.guava
implementation libs.typesafe.config

implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")

implementation 'com.google.protobuf:protobuf-java-util:3.20.0'
implementation libs.bundles.jackson
implementation libs.protobuf.java.util

}
10 changes: 2 additions & 8 deletions desktop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ dependencies {
implementation("bisq.wallets:api")

implementation libs.google.guava

implementation 'de.jensd:fontawesomefx:8.0.0'
implementation 'de.jensd:fontawesomefx-commons:9.1.2'
implementation 'de.jensd:fontawesomefx-materialdesignfont:2.0.26-9.1.2'

implementation "org.fxmisc.easybind:easybind:1.0.3"
implementation 'org.fxmisc.richtext:richtextfx:0.10.9'

implementation libs.bundles.fontawesomefx
implementation libs.bundles.fxmisc.libs
}
9 changes: 2 additions & 7 deletions desktopapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,8 @@ dependencies {
implementation("bisq.wallets:api")

implementation libs.google.guava

implementation 'de.jensd:fontawesomefx:8.0.0'
implementation 'de.jensd:fontawesomefx-commons:9.1.2'
implementation 'de.jensd:fontawesomefx-materialdesignfont:2.0.26-9.1.2'

implementation "org.fxmisc.easybind:easybind:1.0.3"
implementation 'org.fxmisc.richtext:richtextfx:0.10.9'
implementation libs.bundles.fontawesomefx
implementation libs.bundles.fxmisc.libs

}

Expand Down
132 changes: 102 additions & 30 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,118 @@
# Convention: mark all versions using 'strictly'. This ensures only one version is allowed in the dependency tree, even
# when multiple versions are attempted to be brought in as transitive dependencies of other requirements.
[versions]
annotations-lib = { strictly = '23.0.0' }
bouncycastle-lib = { strictly = '1.67' } # Oldest version without known CVEs
google-gson-lib = { strictly = '2.9.0' }
google-guava-lib = { strictly = '31.1-jre' }
i2p-lib = { strictly = '1.7.0' }
jpackage-plugin = { strictly = '1.3.1' }
junit-jupiter-lib = { strictly = '5.8.2' }
kotlindsl-plugin = { strictly = '2.1.7' }
logback-lib = { strictly = '1.2.11' }
lombok-lib = { strictly = '1.18.22' }
openjfx-plugin = { strictly = '0.0.12' }
protobuf-plugin = { strictly = '0.8.18' }
protobuf-java-lib = { strictly = '3.19.4' }
shadow-plugin = { strictly = '7.1.2' }
slf4j-lib = { strictly = '1.7.36' }
typesafe-config-lib = { strictly = '1.4.2' }
annotations-lib = { strictly = '23.0.0' }

apache-commons-compress-lib = { strictly = '1.21' }
apache-httpcomponents-core-lib = { strictly = '4.4.13' }
apache-httpcomponents-httpclient-lib = { strictly = '4.5.13' }

assertj-core-lib = { strictly = '3.22.0' }
bisq-tor-binary-lib = { strictly = 'b9c6227' }
bisq-jsonrpc4j-lib = { strictly = '1.6.0.bisq.2' }
bouncycastle-lib = { strictly = '1.67' } # Oldest version without known CVEs
chimp-jtorctl-lib = { strictly = '9b5ba203' }

fontawesomefx-lib = { strictly = '8.0.0' }
fontawesomefx-commons-lib = { strictly = '9.1.2' }
fontawesomefx-materialdesignfont-lib = { strictly = '2.0.26-9.1.2' }

fxmisc-easybind-lib = { strictly = '1.0.3' }
fxmisc-richtextfx-lib = { strictly = '0.10.9' }

google-gson-lib = { strictly = '2.9.0' }
google-guava-lib = { strictly = '31.1-jre' }

i2p-lib = { strictly = '1.7.0' }
jackson-lib = { strictly = '2.13.2' }
jeasy-easy-states-lib = { strictly = '2.0.0' }
jeromq-lib = { strictly = '0.5.2' }
jpackage-plugin = { strictly = '1.3.1' }
junit-jupiter-lib = { strictly = '5.8.2' }
kotlindsl-plugin = { strictly = '2.1.7' }
logback-lib = { strictly = '1.2.11' }
lombok-lib = { strictly = '1.18.22' }
openjfx-plugin = { strictly = '0.0.12' }

protobuf-plugin = { strictly = '0.8.18' }
protobuf-java-lib = { strictly = '3.19.4' }

shadow-plugin = { strictly = '7.1.2' }
slf4j-lib = { strictly = '1.7.36' }
spring-boot-starter-web-lib = { strictly = '2.5.6' }
springfox-lib = { strictly = '3.0.0' }
typesafe-config-lib = { strictly = '1.4.2' }

# Referenced in subproject's build.gradle > dependencies block in the form 'implementation libs.guava'
# Note: keys can contain dash (protobuf-java) but the dash is replaced by dot when referenced
# in a build.gradle ('implementation libs.protobuf.java')
[libraries]
annotations = { module = 'org.jetbrains:annotations', version.ref = 'annotations-lib' }
bouncycastle = { module = 'org.bouncycastle:bcprov-jdk15on', version.ref = 'bouncycastle-lib' }
google-gson = { module = 'com.google.code.gson:gson', version.ref = 'google-gson-lib' }
google-guava = { module = 'com.google.guava:guava', version.ref = 'google-guava-lib' }
i2p-streaming = { module = 'net.i2p.client:streaming', version.ref = 'i2p-lib' }
i2p-core = { module = 'net.i2p:i2p', version.ref = 'i2p-lib' }
i2p-router = { module = 'net.i2p:router', version.ref = 'i2p-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' }
protobuf-java = { module = 'com.google.protobuf:protobuf-java', version.ref = 'protobuf-java-lib' }
slf4j-api = { module = 'org.slf4j:slf4j-api', version.ref = 'slf4j-lib' }
typesafe-config = { module = 'com.typesafe:config', version.ref = 'typesafe-config-lib' }
apache-commons-compress = { module = 'org.apache.commons:commons-compress', version.ref = 'apache-commons-compress-lib' }
apache-httpcomponents-core = { module = 'org.apache.httpcomponents:httpcore', version.ref = 'apache-httpcomponents-core-lib' }
apache-httpcomponents-httpclient = { module = 'org.apache.httpcomponents:httpclient', version.ref = 'apache-httpcomponents-httpclient-lib' }
assertj-core = { module = 'org.assertj:assertj-core', version.ref = 'assertj-core-lib' }

annotations = { module = 'org.jetbrains:annotations', version.ref = 'annotations-lib' }
bisq-jsonrpc4j = { module = 'com.github.bisq-network:jsonrpc4j', version.ref = 'bisq-jsonrpc4j-lib' }

bisq-tor-binary-geoip = { module = 'com.github.bisq-network.tor-binary:tor-binary-geoip', version.ref = 'bisq-tor-binary-lib' }
bisq-tor-binary-macos = { module = 'com.github.bisq-network.tor-binary:tor-binary-macos', version.ref = 'bisq-tor-binary-lib' }
bisq-tor-binary-linux32 = { module = 'com.github.bisq-network.tor-binary:tor-binary-linux32', version.ref = 'bisq-tor-binary-lib' }
bisq-tor-binary-linux64 = { module = 'com.github.bisq-network.tor-binary:tor-binary-linux64', version.ref = 'bisq-tor-binary-lib' }
bisq-tor-binary-windows = { module = 'com.github.bisq-network.tor-binary:tor-binary-windows', version.ref = 'bisq-tor-binary-lib' }

bouncycastle = { module = 'org.bouncycastle:bcprov-jdk15on', version.ref = 'bouncycastle-lib' }

chimp-jsocks = { module = 'com.github.chimp1984:jsocks' }
chimp-jtorctl = { module = 'com.github.chimp1984:jtorctl', version.ref = 'chimp-jtorctl-lib' }

fontawesomefx = { module = 'de.jensd:fontawesomefx', version.ref = 'fontawesomefx-lib' }
fontawesomefx-commons = { module = 'de.jensd:fontawesomefx-commons', version.ref = 'fontawesomefx-commons-lib' }
fontawesomefx-materialdesignfont = { module = 'de.jensd:fontawesomefx-materialdesignfont', version.ref = 'fontawesomefx-materialdesignfont-lib' }

fxmisc-easybind = { module = 'org.fxmisc.easybind:easybind', version.ref = 'fxmisc-easybind-lib' }
fxmisc-richtextfx = { module = 'org.fxmisc.richtext:richtextfx', version.ref = 'fxmisc-richtextfx-lib' }

google-gson = { module = 'com.google.code.gson:gson', version.ref = 'google-gson-lib' }
google-guava = { module = 'com.google.guava:guava', version.ref = 'google-guava-lib' }

i2p-streaming = { module = 'net.i2p.client:streaming', version.ref = 'i2p-lib' }
i2p-core = { module = 'net.i2p:i2p', version.ref = 'i2p-lib' }
i2p-router = { module = 'net.i2p:router', version.ref = 'i2p-lib' }

jackson-core = { module = 'com.fasterxml.jackson.core:jackson-core', version.ref = 'jackson-lib' }
jackson-annotations = { module = 'com.fasterxml.jackson.core:jackson-annotations', version.ref = 'jackson-lib' }
jackson-databind = { module = 'com.fasterxml.jackson.core:jackson-databind', version.ref = 'jackson-lib' }

jeasy-easy-states = { module = 'org.jeasy:easy-states', version.ref = 'jeasy-easy-states-lib' }
jeromq = { module = 'org.zeromq:jeromq', version.ref = 'jeromq-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' }

protobuf-java = { module = 'com.google.protobuf:protobuf-java', version.ref = 'protobuf-java-lib' }
protobuf-java-util = { module = 'com.google.protobuf:protobuf-java-util', version.ref = 'protobuf-java-lib' }

slf4j-api = { module = 'org.slf4j:slf4j-api', version.ref = 'slf4j-lib' }
spring-boot-starter-web = { module = 'org.springframework.boot:spring-boot-starter-web', version.ref = 'spring-boot-starter-web-lib' }

springfox-boot-starter = { module = 'io.springfox:springfox-boot-starter', version.ref = 'springfox-lib' }
springfox-swagger2 = { module = 'io.springfox:springfox-swagger2', version.ref = 'springfox-lib' }
springfox-swagger-ui = { module = 'io.springfox:springfox-swagger-ui', version.ref = 'springfox-lib' }

typesafe-config = { module = 'com.typesafe:config', version.ref = 'typesafe-config-lib' }

# Defines groups of libs that are commonly used together
# Referenced in dependencies block as 'implementation libs.bundles.i2p'
[bundles]
bisq-tor-binaries = ['bisq-tor-binary-geoip', 'bisq-tor-binary-macos', 'bisq-tor-binary-linux32', 'bisq-tor-binary-linux64', 'bisq-tor-binary-windows']
fontawesomefx = ['fontawesomefx', 'fontawesomefx-commons', 'fontawesomefx-materialdesignfont']
fxmisc-libs = ['fxmisc-easybind', 'fxmisc-richtextfx']
i2p = ['i2p-core', 'i2p-router', 'i2p-streaming']
jackson = ['jackson-core', 'jackson-annotations', 'jackson-databind']
springfox-libs = ['springfox-boot-starter', 'springfox-swagger2', 'springfox-swagger-ui']

# Referenced in subproject's build.gradle > plugin block as alias: `alias(libs.plugins.protobuf)`
# Note: plugin version constraints are not supported by the java-platform plugin, so cannot be enforced there. However,
Expand Down
2 changes: 1 addition & 1 deletion i2p/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {

// Exclude httpclient transitive dependency because it may override
// I2P-specific impl of some Apache classes like org.apache.http.util.Args
implementation('org.apache.httpcomponents:httpcore:4.4.13') {
implementation(libs.apache.httpcomponents.core) {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}

Expand Down
4 changes: 2 additions & 2 deletions network/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ dependencies {
implementation libs.google.guava
implementation libs.typesafe.config

implementation 'com.github.chimp1984:jsocks'
implementation 'org.apache.httpcomponents:httpclient'
implementation libs.apache.httpcomponents.httpclient
implementation libs.chimp.jsocks
}
2 changes: 1 addition & 1 deletion offer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ dependencies {

implementation libs.google.gson
implementation libs.google.guava
implementation 'com.github.chimp1984:jsocks'
implementation libs.chimp.jsocks
}
3 changes: 1 addition & 2 deletions protocol/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ dependencies {

implementation libs.google.guava
implementation libs.typesafe.config

implementation("org.jeasy:easy-states:2.0.0")
implementation libs.jeasy.easy.states
}
2 changes: 1 addition & 1 deletion social/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
implementation project(':oracle')
implementation project(':presentation')

implementation 'com.github.chimp1984:jsocks'
implementation libs.chimp.jsocks
implementation libs.google.gson
implementation libs.google.guava
implementation libs.typesafe.config
Expand Down
13 changes: 4 additions & 9 deletions tor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@ dependencies {
implementation project(':common')

implementation libs.google.guava
implementation libs.apache.commons.compress

implementation 'org.apache.commons:commons-compress'
implementation libs.chimp.jsocks
implementation libs.chimp.jtorctl

implementation 'com.github.chimp1984:jsocks'
implementation 'com.github.chimp1984:jtorctl:9b5ba203'

implementation 'com.github.bisq-network.tor-binary:tor-binary-geoip:b9c6227'
implementation 'com.github.bisq-network.tor-binary:tor-binary-macos:b9c6227'
implementation 'com.github.bisq-network.tor-binary:tor-binary-linux32:b9c6227'
implementation 'com.github.bisq-network.tor-binary:tor-binary-linux64:b9c6227'
implementation 'com.github.bisq-network.tor-binary:tor-binary-windows:b9c6227'
implementation libs.bundles.bisq.tor.binaries
}
11 changes: 3 additions & 8 deletions wallets/bitcoind/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@ plugins {
id 'bisq.protobuf'
}

ext {
jacksonVersion = '2.13.2'
jeroMqVersion = '0.5.2'
}

dependencies {
implementation("bisq:common")
implementation("bisq:persistence")

implementation project(':core')

implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation libs.google.guava
implementation("org.zeromq:jeromq:$jeroMqVersion")
implementation libs.jackson.databind
implementation libs.jeromq

testImplementation project(':regtest')
testImplementation("org.assertj:assertj-core:3.22.0")
testImplementation libs.assertj.core
}
8 changes: 1 addition & 7 deletions wallets/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ plugins {
id 'bisq.protobuf'
}

ext {
jsonrpc4jVersion = '1.6.0.bisq.2'
jacksonVersion = '2.13.2'
jeroMqVersion = '0.5.2'
}

dependencies {
implementation("bisq:common")
implementation("com.github.bisq-network:jsonrpc4j:$jsonrpc4jVersion") {
implementation(libs.bisq.jsonrpc4j) {
exclude(module: 'base64')
exclude(module: 'httpcore-nio')
}
Expand Down
11 changes: 3 additions & 8 deletions wallets/elementsd/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,17 @@ plugins {
id 'bisq.protobuf'
}

ext {
jacksonVersion = '2.13.2'
jeroMqVersion = '0.5.2'
}

dependencies {
implementation("bisq:common")
implementation("bisq:persistence")

implementation project(':core')
implementation project(':bitcoind')

implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation libs.google.guava
implementation("org.zeromq:jeromq:$jeroMqVersion")
implementation libs.jackson.databind
implementation libs.jeromq

testImplementation project(':regtest')
testImplementation("org.assertj:assertj-core:3.22.0")
testImplementation libs.assertj.core
}
2 changes: 1 addition & 1 deletion wallets/regtest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies {

implementation libs.junit.jupiter
implementation libs.google.guava
implementation "org.assertj:assertj-core:3.22.0"
testImplementation libs.assertj.core
}