mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
[android] Enable Java 21
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
2
.github/workflows/android-check.yaml
vendored
2
.github/workflows/android-check.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- main
|
||||
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||
JAVA_HOME: /usr/lib/jvm/temurin-21-jdk-amd64 # Java 21 is required for Android Gradle 8 plugin
|
||||
SKIP_MAP_DOWNLOAD: true
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -29,12 +29,12 @@ def getCommitMessage() {
|
||||
project.ext.appId = 'app.comaps'
|
||||
project.ext.appName = 'CoMaps'
|
||||
|
||||
// I have Java 21 installed, but this doesn't work on MacOS.
|
||||
//java {
|
||||
// toolchain {
|
||||
// languageVersion.set(JavaLanguageVersion.of(17))
|
||||
// }
|
||||
//}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(21))
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = 'app.organicmaps'
|
||||
@@ -311,8 +311,8 @@ android {
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled = true
|
||||
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
sourceCompatibility JavaVersion.VERSION_21
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ Check if you have a system-wide Java Runtime Environment (JRE) installed:
|
||||
java -version
|
||||
```
|
||||
|
||||
If your system doesn't have a JRE installed or Java version is less than 17 (OpenJDK)
|
||||
If your system doesn't have a JRE installed or Java version is less than 21 (OpenJDK)
|
||||
or you want command line builds to use a JRE version bundled with the Studio
|
||||
then set the `JAVA_HOME` environment variable:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user