Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
16 changes: 10 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
}

Expand All @@ -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'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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