mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
switch the Java toolchain to version 21
Switch the Java toolchain to version 21 - the version shipped with current AndroidStudio releases. Disable Java 1.8 warnings - see discussion in PR #4735
This commit is contained in:
committed by
José Rebelo
parent
87fd6b1596
commit
03e14edee4
@@ -35,9 +35,9 @@ artifacts {
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
// setting sourceCompatibility and targetCompatibility isn't required because this module
|
||||
// ships no complied code
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
|
||||
tasks.named("distTar") {
|
||||
|
@@ -11,6 +11,11 @@ tasks.withType(Test).configureEach {
|
||||
systemProperty "GB_LOGFILES_DIR", Files.createTempDirectory("gblog").toString()
|
||||
}
|
||||
|
||||
// disable Java 1.8 warning
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.compilerArgs << "-Xlint:-options"
|
||||
}
|
||||
|
||||
def getVersionCode = { ->
|
||||
try {
|
||||
def commitCount = providers.exec {
|
||||
@@ -68,7 +73,7 @@ def getGitHashShort = { ->
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
|
||||
android {
|
||||
|
@@ -23,3 +23,6 @@ android.enableJetifier=false
|
||||
|
||||
# FIXME: This optimizes away some classes it should not - see #3853
|
||||
android.enableR8.fullMode=false
|
||||
|
||||
# disable Java 1.8 warning
|
||||
android.javaCompile.suppressSourceTargetDeprecationWarning=true
|
Reference in New Issue
Block a user