diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26245e18..0d4af2a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Java JDK uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6 with: - java-version: 25 + java-version: 26 distribution: 'corretto' - name: Setup Android SDK @@ -82,7 +82,7 @@ jobs: - name: Setup Java JDK uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6 with: - java-version: 25 + java-version: 26 distribution: 'corretto' - name: Setup Android SDK diff --git a/CLAUDE.md b/CLAUDE.md index 521cd942..add59510 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,7 +40,7 @@ because the alternative has cost something here. ./gradlew assembleRelease lintRelease # what CI gates on; runs ndk-build for both ABIs, slow ``` -Toolchain: AGP 9.3.1, Gradle 9.6.1, Java 25 toolchain, NDK pinned in `app/build.gradle`. The JDK +Toolchain: AGP 9.4.0, Gradle 9.6.1, Java 26 toolchain, NDK pinned in `app/build.gradle`. The JDK and NDK are downloaded automatically. `git submodule update --init --recursive` is required before any native build. @@ -245,7 +245,7 @@ how regressions get reintroduced. ## Modernisation -Source and target level are **Java 25**. Of the modern constructs, three are in use: `var` +Source and target level are **Java 26**. Of the modern constructs, three are in use: `var` (`UsbDriverService`, `XboxWirelessDongle`), records (`GameMenu.MenuOption`, `ComputerDetails.AddressTuple`) and switch expressions (`BrowseState`). Pattern-matching `instanceof` and text blocks appear nowhere yet. Nothing is known to be broken; they simply have diff --git a/README.md b/README.md index 54727dff..a5cd2afa 100644 --- a/README.md +++ b/README.md @@ -413,7 +413,7 @@ or take the signed APK artifact from a [Build workflow](.github/workflows/build. * Run ‘git submodule update --init --recursive’ from within moonlight-android/ * Build the APK using Android Studio or ‘./gradlew assembleRelease’ -The NDK (pinned by ‘ndkVersion’ in app/build.gradle) and the JDK 25 toolchain used to +The NDK (pinned by ‘ndkVersion’ in app/build.gradle) and the JDK 26 toolchain used to compile Java are both downloaded automatically. Python 3 is needed at build time for the patch step below, which runs from `preBuild`. diff --git a/app/build.gradle b/app/build.gradle index adc4af2c..5093d71c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -70,8 +70,8 @@ android { compileOptions { // Explicit so the build does not depend on the platform default encoding encoding = "UTF-8" - sourceCompatibility = JavaVersion.VERSION_25 - targetCompatibility = JavaVersion.VERSION_25 + sourceCompatibility = JavaVersion.VERSION_26 + targetCompatibility = JavaVersion.VERSION_26 } lint { @@ -181,10 +181,13 @@ android { } } -// Compile with JDK 25 regardless of the JDK running Gradle. +// Compile with JDK 26 regardless of the JDK running Gradle. 26 is the newest JDK whose class files +// (major version 70) Android Lint can read: JDK 27 output makes lint log "Unsupported class file +// major version 71" for every class and still exit green with its bytecode checks skipped, so a +// bump past 26 needs that re-checked, not just a green CI run. java { toolchain { - languageVersion = JavaLanguageVersion.of(25) + languageVersion = JavaLanguageVersion.of(26) } } @@ -197,8 +200,9 @@ tasks.withType(Test).configureEach { .withPathSensitivity(PathSensitivity.RELATIVE) } -// 0.8.15 is the first release that understands class file major version 69, which is what the -// JDK 25 toolchain above emits. Older versions fail instrumentation outright. +// 0.8.15 is the first release with official support for class file major version 70, which is +// what the JDK 26 toolchain above emits; 0.8.14 only read it experimentally, and older versions +// fail instrumentation outright. jacoco { toolVersion = '0.8.15' } diff --git a/gradle.properties b/gradle.properties index aacebcbe..e0e68a2b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,7 @@ org.gradle.parallel=true org.gradle.caching=true # This project is Java-only. AGP's built-in Kotlin compiler caps jvmTarget at 24, -# which would block the JDK 25 toolchain used for Java compilation. +# which would block the JDK 26 toolchain used for Java compilation. # NOTE: AGP reports this option as deprecated. If it is removed, the Java # bytecode target must drop to whatever the bundled Kotlin compiler supports. android.builtInKotlin=false