mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
build.gradle: enforce Android flavor of Guava
This commit is contained in:
parent
c1bb78137c
commit
7a00b82746
1 changed files with 14 additions and 0 deletions
|
@ -23,6 +23,20 @@ dependencies {
|
||||||
testImplementation 'pl.pragmatists:JUnitParams:1.1.1'
|
testImplementation 'pl.pragmatists:JUnitParams:1.1.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent newer Gradle from switching to JRE version of Guava
|
||||||
|
def gradleVersionTargetJVM = GradleVersion.version("7.0")
|
||||||
|
if (GradleVersion.current().compareTo(gradleVersionTargetJVM) > 0) {
|
||||||
|
dependencies.constraints {
|
||||||
|
implementation("com.google.guava:guava") {
|
||||||
|
attributes {
|
||||||
|
attribute(
|
||||||
|
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
|
||||||
|
objects.named(TargetJvmEnvironment, TargetJvmEnvironment.ANDROID))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sourceCompatibility = 8
|
sourceCompatibility = 8
|
||||||
targetCompatibility = 8
|
targetCompatibility = 8
|
||||||
compileJava.options.encoding = 'UTF-8'
|
compileJava.options.encoding = 'UTF-8'
|
||||||
|
|
Loading…
Add table
Reference in a new issue