dependencies {
constraints {
implementation('com.google.guava:guava:29.0-jre')
}
def c = platform('com.google.cloud:libraries-bom:12.1.0')
// This line lets me use 29.0-jre
implementation c
implementation 'com.google.guava:guava'
}
compileClasspath - Compile classpath for source set 'main'.
+--- com.google.cloud:libraries-bom:12.1.0
| \--- com.google.guava:guava:29.0-android -> 29.0-jre (c)
+--- com.google.guava:guava -> 29.0-jre
| +--- com.google.guava:failureaccess:1.0.1
| +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
| +--- com.google.code.findbugs:jsr305:3.0.2
| +--- org.checkerframework:checker-qual:2.11.1
| +--- com.google.errorprone:error_prone_annotations:2.3.4
| \--- com.google.j2objc:j2objc-annotations:1.3
\--- com.google.guava:guava:29.0-jre (c)
dependencies {
constraints {
implementation('com.google.guava:guava') {
version('29.0-jre')
}
}
def c = platform('com.google.cloud:libraries-bom:12.1.0')
// This line lets me use 29.0-jre
implementation c
implementation 'com.google.guava:guava'
}
The version clause was incorrectly used?
compileClasspath - Compile classpath for source set 'main'.
+--- com.google.cloud:libraries-bom:12.1.0
| \--- com.google.guava:guava:29.0-android (c)
+--- com.google.guava:guava -> 29.0-android
| +--- com.google.guava:failureaccess:1.0.1
| +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
| +--- com.google.code.findbugs:jsr305:3.0.2
| +--- org.checkerframework:checker-compat-qual:2.5.5
| +--- com.google.errorprone:error_prone_annotations:2.3.4
| \--- com.google.j2objc:j2objc-annotations:1.3
\--- com.google.guava:guava -> 29.0-android (c)
dependencies {
constraints {
implementation('com.google.guava:guava') {
version {
require '29.0-jre'
}
}
}
def c = enforcedPlatform('com.google.cloud:libraries-bom:12.1.0')
// This line lets me use 29.0-jre
implementation c
implementation 'com.google.guava:guava'
}
The require is weaker than enforcedPlatform.
compileClasspath - Compile classpath for source set 'main'.
+--- com.google.cloud:libraries-bom:12.1.0
| \--- com.google.guava:guava:29.0-android (c)
+--- com.google.guava:guava -> 29.0-android
| +--- com.google.guava:failureaccess:1.0.1
| +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
| +--- com.google.code.findbugs:jsr305:3.0.2
| +--- org.checkerframework:checker-compat-qual:2.5.5
| +--- com.google.errorprone:error_prone_annotations:2.3.4
| \--- com.google.j2objc:j2objc-annotations:1.3
\--- com.google.guava:guava:29.0-jre -> 29.0-android (c)