Skip to content

Commit

Permalink
Merge pull request #211 from alkum/gradle-consolidate-various-libs
Browse files Browse the repository at this point in the history
Gradle consolidate various libs
  • Loading branch information
chimp1984 authored Apr 5, 2022
2 parents 5ce3a2f + 0697281 commit 477623d
Show file tree
Hide file tree
Showing 31 changed files with 71 additions and 70 deletions.
2 changes: 1 addition & 1 deletion account/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
implementation project(':network')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
}
test {
useJUnitPlatform()
Expand Down
2 changes: 1 addition & 1 deletion application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies {
implementation project(':wallets')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
implementation libs.typesafe.config
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "org.gradle.kotlin.kotlin-dsl" version "2.1.7"
alias(libs.plugins.kotlindsl)
alias(libs.plugins.protobuf)
id 'signing'
id 'maven-publish'
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/logging-dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
api platform(project(':platforms:common-platform'))
implementation 'org.slf4j:slf4j-api'
implementation 'ch.qos.logback:logback-core'
implementation 'ch.qos.logback:logback-classic'
implementation libs.slf4j.api
implementation libs.logback.core
implementation libs.logback.classic
}
4 changes: 2 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dependencies {
api platform(project(':platforms:common-platform'))

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
implementation libs.typesafe.config
implementation 'org.jetbrains:annotations:23.0.0'
implementation libs.annotations
}

test {
Expand Down
2 changes: 1 addition & 1 deletion contract/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
implementation project(':network')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
}

test {
Expand Down
2 changes: 1 addition & 1 deletion desktop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {
implementation project(':application')
implementation project(':wallets')

implementation libs.guava
implementation libs.google.guava

implementation 'com.jfoenix:jfoenix:9.0.10'
implementation 'de.jensd:fontawesomefx:8.0.0'
Expand Down
2 changes: 1 addition & 1 deletion desktopapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {
implementation project(':wallets')
implementation project(':desktop')

implementation libs.guava
implementation libs.google.guava

implementation 'com.jfoenix:jfoenix:9.0.10'
implementation 'de.jensd:fontawesomefx:8.0.0'
Expand Down
49 changes: 30 additions & 19 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,38 @@
# 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]
guava = { strictly = '31.1-jre' }
i2p = { strictly = '1.7.0' }
junit-jupiter = { strictly = '5.8.2' }
lombok = { strictly = '1.18.22'}
openjfx = { strictly = '0.0.12' }
protobuf = { strictly = '0.8.18' }
protobuf-java = { strictly = '3.19.4' }
typesafe-config = { strictly = '1.4.2' }
annotations-lib = { strictly = '23.0.0' }
google-gson-lib = { strictly = '2.9.0' }
google-guava-lib = { strictly = '31.1-jre' }
i2p-lib = { strictly = '1.7.0' }
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' }
slf4j-lib = { strictly = '1.7.36' }
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]
guava = { module = 'com.google.guava:guava', version.ref = 'guava' }
i2p-streaming = { module = 'net.i2p.client:streaming', version.ref = 'i2p' }
i2p-core = { module = 'net.i2p:i2p', version.ref = 'i2p' }
i2p-router = { module = 'net.i2p:router', version.ref = 'i2p' }
junit-jupiter-api = { module = 'org.junit.jupiter:junit-jupiter-api', version.ref = 'junit-jupiter' }
junit-jupiter-engine = { module = 'org.junit.jupiter:junit-jupiter-engine', version.ref = 'junit-jupiter' }
lombok = { module = 'org.projectlombok:lombok', version.ref = 'lombok' }
protobuf-java = { module = 'com.google.protobuf:protobuf-java', version.ref = 'protobuf-java' }
typesafe-config = { module = 'com.typesafe:config', version.ref = 'typesafe-config' }
annotations = { module = 'org.jetbrains:annotations', version.ref = 'annotations-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-api = { module = 'org.junit.jupiter:junit-jupiter-api', version.ref = 'junit-jupiter-lib' }
junit-jupiter-engine = { module = 'org.junit.jupiter:junit-jupiter-engine', 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' }

# Defines groups of libs that are commonly used together
# Referenced in dependencies block as 'implementation libs.bundles.i2p'
Expand All @@ -38,5 +48,6 @@ i2p = ['i2p-core', 'i2p-router', 'i2p-streaming']
# since plugins don't bring other plugins as transitive dependencies, as long as they are loaded using the
# `alias(libs.plugins.protobuf)` mechanism, there is no risk of loading multiple versions.
[plugins]
openjfx = { id = 'org.openjfx.javafxplugin', version.ref = 'openjfx' }
protobuf = { id = 'com.google.protobuf', version.ref = 'protobuf' }
kotlindsl = { id = 'org.gradle.kotlin.kotlin-dsl', version.ref = 'kotlindsl-plugin' }
openjfx = { id = 'org.openjfx.javafxplugin', version.ref = 'openjfx-plugin' }
protobuf = { id = 'com.google.protobuf', version.ref = 'protobuf-plugin' }
2 changes: 1 addition & 1 deletion grpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
implementation 'io.grpc:grpc-services'
implementation 'io.grpc:grpc-stub'
implementation 'org.codehaus.mojo:animal-sniffer-annotations'
implementation libs.guava
implementation libs.google.guava
}

ext {
Expand Down
2 changes: 1 addition & 1 deletion i18n/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
api platform(project(':platforms:common-platform'))

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
}

test {
Expand Down
2 changes: 1 addition & 1 deletion i2p/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
implementation project(':common')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava

// Exclude httpclient transitive dependency because it may override
// I2P-specific impl of some Apache classes like org.apache.http.util.Args
Expand Down
2 changes: 1 addition & 1 deletion identity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
implementation project(':network')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
implementation libs.typesafe.config
}
test {
Expand Down
2 changes: 1 addition & 1 deletion network/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
implementation project(':persistence')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
implementation libs.typesafe.config

implementation 'com.github.chimp1984:jsocks'
Expand Down
4 changes: 2 additions & 2 deletions offer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ dependencies {
implementation project(':wallets')

implementation libs.protobuf.java
implementation libs.guava
implementation 'com.google.code.gson:gson'
implementation libs.google.gson
implementation libs.google.guava
implementation 'com.github.chimp1984:jsocks'
}

Expand Down
4 changes: 2 additions & 2 deletions oracle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ dependencies {
implementation project(':network')

implementation libs.protobuf.java
implementation libs.guava
implementation 'com.google.code.gson:gson'
implementation libs.google.gson
implementation libs.google.guava
implementation libs.typesafe.config
}

Expand Down
2 changes: 1 addition & 1 deletion persistence/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
implementation project(':common')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
}

test {
Expand Down
22 changes: 6 additions & 16 deletions platforms/common-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies {
/////////////////////////////////////////////////////////////////////////////////
// Guava and transitive dependency constraints
/////////////////////////////////////////////////////////////////////////////////
api(libs.guava)
api(libs.google.guava)
// Declaring the guava dependency above will bring in the transitive dependencies below.
// If some other dependency brings in other versions of the transitive dependencies below,
// they should be excluded.
Expand Down Expand Up @@ -62,27 +62,17 @@ dependencies {
/////////////////////////////////////////////////////////////////////////////////
// Gson dependency constraints
/////////////////////////////////////////////////////////////////////////////////
api('com.google.code.gson:gson') {
version { require '2.8.6' }
}
api(libs.google.gson)

/////////////////////////////////////////////////////////////////////////////////
// Logging dependency constraints
/////////////////////////////////////////////////////////////////////////////////
api('org.slf4j:slf4j-api') {
version { require '1.7.30' }
}
api('ch.qos.logback:logback-core') {
version { require '1.2.3' }
}
api('ch.qos.logback:logback-classic') {
version { require '1.2.3' }
}
api(libs.slf4j.api)
api(libs.logback.core)
api(libs.logback.classic)

// The runtime configuration should be used to declare
// constraints or dependencies which are visible at runtime.
runtime('org.slf4j:slf4j-api') {
version { require '1.7.30' }
}
runtime(libs.slf4j.api)
}
}
2 changes: 1 addition & 1 deletion platforms/grpc-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ dependencies {
/////////////////////////////////////////////////////////////////////////////////
// Guava and transitive dependency constraints (grpc only)
/////////////////////////////////////////////////////////////////////////////////
api(libs.guava)
api(libs.google.guava)
}
}
2 changes: 1 addition & 1 deletion presentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
implementation project(':offer')
implementation project(':oracle')

implementation libs.guava
implementation libs.google.guava
}

test {
Expand Down
2 changes: 1 addition & 1 deletion protocol/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
implementation project(':wallets')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
implementation libs.typesafe.config

implementation("org.jeasy:easy-states:2.0.0")
Expand Down
2 changes: 1 addition & 1 deletion satoshisquareapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dependencies {
implementation project(':wallets')
implementation project(':desktop')

implementation libs.guava
implementation libs.google.guava

implementation 'com.jfoenix:jfoenix:9.0.10'
implementation 'de.jensd:fontawesomefx:8.0.0'
Expand Down
2 changes: 1 addition & 1 deletion security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies {
implementation project(':persistence')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
implementation 'org.bouncycastle:bcprov-jdk16:1.46'
}
test {
Expand Down
2 changes: 1 addition & 1 deletion seed/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies {

implementation project(':application')

implementation libs.guava
implementation libs.google.guava
implementation libs.typesafe.config
}
test {
Expand Down
2 changes: 1 addition & 1 deletion settings/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
implementation project(':persistence')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
}
test {
useJUnitPlatform()
Expand Down
4 changes: 2 additions & 2 deletions social/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ dependencies {
implementation project(':presentation')

implementation 'com.github.chimp1984:jsocks'
implementation "com.google.code.gson:gson:2.8.5"
implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.gson
implementation libs.google.guava
implementation libs.typesafe.config
}

Expand Down
2 changes: 1 addition & 1 deletion support/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
implementation project(':network')

implementation libs.protobuf.java
implementation libs.guava
implementation libs.google.guava
}
test {
useJUnitPlatform()
Expand Down
2 changes: 1 addition & 1 deletion tools/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {
implementation project(':wallets')
implementation project(':desktop')

implementation libs.guava
implementation libs.google.guava

implementation 'com.jfoenix:jfoenix:9.0.10'
implementation 'de.jensd:fontawesomefx:8.0.0'
Expand Down
2 changes: 1 addition & 1 deletion tor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {

implementation project(':common')

implementation libs.guava
implementation libs.google.guava

implementation 'org.apache.commons:commons-compress'

Expand Down
2 changes: 1 addition & 1 deletion wallets/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
exclude(module: 'base64')
exclude(module: 'httpcore-nio')
}
implementation libs.guava
implementation libs.google.guava

testImplementation("org.assertj:assertj-core:3.22.0")
}
Expand Down
2 changes: 1 addition & 1 deletion web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
implementation project(':presentation')
implementation project(':application')

implementation 'com.google.code.gson:gson'
implementation libs.google.gson

implementation 'io.ratpack:ratpack-core'
implementation 'io.ratpack:ratpack-rx2'
Expand Down

0 comments on commit 477623d

Please sign in to comment.