mirror of
https://github.com/signalapp/libsignal.git
synced 2026-05-05 06:32:35 +02:00
Previously the project would error out during the configuration stage, since the Android Gradle plugin requires JDK 11 to even load. Now it throws an error if you try to build a top-level task or a task in the Android subproject, but allows you to build, e.g. 'client:test' with no problems.
19 lines
714 B
Groovy
19 lines
714 B
Groovy
pluginManagement {
|
|
repositories {
|
|
gradlePluginPortal()
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
include ':client', ':server'
|
|
|
|
if (JavaVersion.current().isJava11Compatible()) {
|
|
include ':android'
|
|
} else if (gradle.startParameter.getTaskNames().any { name -> name.contains('android:') }) {
|
|
throw new GradleException("building for Android requires JDK 11 or newer")
|
|
} else if (gradle.startParameter.getTaskNames().any { name -> name.lastIndexOf(':') <= 0 }) {
|
|
// If there are any top-level tasks ("build" or ":build" but not ":client:build")...
|
|
throw new GradleException("building for Android requires JDK 11 or newer; use 'client:' or 'server:' to only build certain products")
|
|
}
|