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
10 changes: 9 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,15 @@ jobs:
# would also fan out to both, but the explicit tasks make the intent legible.
- name: Bundle release AABs (foss + play, unsigned)
working-directory: android
run: ./gradlew :app:bundleFossRelease :app:bundlePlayRelease --no-daemon
# `--warning-mode all` because the summary line -- "Deprecated Gradle
# features were used in this build, making it incompatible with Gradle
# 10" -- names nothing. Gradle says so itself: "You can use
# '--warning-mode all' to show the individual deprecation warnings and
# determine if they come from your own scripts or plugins."
#
# A warning that cannot be attributed is a warning nobody acts on, and
# this one has a deadline attached to it.
run: ./gradlew :app:bundleFossRelease :app:bundlePlayRelease --no-daemon --warning-mode all
- name: Upload AABs
uses: actions/upload-artifact@v7
with:
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ cycle-accurate core later replaced.

### Changed

- **Gradle 10 deprecations cleared in the Android build.** Four call sites, each
verified against the artifact rather than against the warning text:

- `AndroidSourceDirectorySet.srcDir(Any)` → the `directories` mutable set. The
interface was read out of the **pinned AGP 9.3.2** `gradle-api` jar, not a
cached older one: `getDirectories()` returns `Set<String>`, so it takes
paths and the call sites pass `.path` rather than a `File`.
- Two Kotlin DSL **delegated properties** (`by tasks.registering(Exec::class)`)
→ `tasks.register<Exec>("name")`. Gradle's own upgrade guide is explicit:
all Kotlin DSL property delegates — `registering`, `creating`, `existing`,
`getting` — are deprecated and scheduled for removal in Gradle 10.
- `currentWindowAdaptiveInfo()` → `currentWindowAdaptiveInfoV2()`, confirmed
present in `material3.adaptive` 1.3.0. Behaviour here is unchanged: both
breakpoints tested are "at least", so a window that now reports the new L or
XL width class still satisfies EXPANDED.

The build also now runs with **`--warning-mode all`**, because the summary
line ("Deprecated Gradle features were used in this build, making it
incompatible with Gradle 10") names nothing — and a warning that cannot be
attributed is one nobody acts on, with a deadline attached.

- **MiSTer co-simulation, rung 5 (sibling repository).** The NROM cartridge, the
work RAM, the console's CPU bus, the controller ports and DMC DMA are landed
and gated at **50 gates green**. The DUT's CPU is driven by the RTL bus and a
Expand Down
14 changes: 9 additions & 5 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,12 @@ android {
// directories — adding them to `.java` (the pre-AGP-9 way) no longer feeds the
// Kotlin compiler, so the binding types (NesController, NpStatus, …) go
// unresolved. See AGP 9 built-in-Kotlin migration notes.
sourceSets["main"].kotlin.srcDir(uniffiGenDir)
sourceSets["main"].jniLibs.srcDir(jniLibsDir)
// `srcDir(Any)` is deprecated in AGP 9 in favour of the `directories`
// mutable set. Verified against the interface rather than the warning text:
// `AndroidSourceDirectorySet.getDirectories()` returns `Set<String>`, so it
// takes PATHS, not `File`s -- hence `.path` on both.
sourceSets["main"].kotlin.directories.add(uniffiGenDir.path)
sourceSets["main"].jniLibs.directories.add(jniLibsDir.path)

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
Expand Down Expand Up @@ -251,7 +255,7 @@ composeCompiler {
// drop them into `jniLibs/<abi>/`. Requires the Android Rust targets + cargo-ndk
// (`rustup target add aarch64-linux-android x86_64-linux-android;
// cargo install cargo-ndk`) and ANDROID_NDK_HOME (or an SDK-resolved NDK).
val cargoNdkBuild by tasks.registering(Exec::class) {
val cargoNdkBuild = tasks.register<Exec>("cargoNdkBuild") {
group = "rust"
description = "Cross-compile rustynes-mobile + rustynes-android into jniLibs via cargo-ndk."
workingDir = workspaceRoot
Expand All @@ -270,7 +274,7 @@ val cargoNdkBuild by tasks.registering(Exec::class) {

// Generate the Kotlin bindings from the compiled arm64 cdylib (the UniFFI API is
// target-independent, so any built library serves as the source of truth).
val uniffiBindgen by tasks.registering(Exec::class) {
val uniffiBindgen = tasks.register<Exec>("uniffiBindgen") {
group = "rust"
description = "Generate Kotlin bindings for the rustynes-mobile control surface via UniFFI."
dependsOn(cargoNdkBuild)
Expand Down Expand Up @@ -309,7 +313,7 @@ dependencies {
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-extended")
// v1.8.8 "Atlas" (Workstream A): adaptive layouts. `adaptive` carries
// currentWindowAdaptiveInfo()/WindowSizeClass (the single layout driver);
// currentWindowAdaptiveInfoV2()/WindowSizeClass (the single layout driver);
// -layout carries ListDetailPaneScaffold; -navigation carries the predictive-
// back-aware NavigableListDetailPaneScaffold for the expanded two-pane.
implementation("androidx.compose.material3.adaptive:adaptive:1.3.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.safeDrawing
import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo
import androidx.compose.material3.adaptive.currentWindowAdaptiveInfoV2
import androidx.window.core.layout.WindowSizeClass
import androidx.compose.material3.Button
import androidx.compose.material3.ColorScheme
Expand Down Expand Up @@ -1014,7 +1014,13 @@ private fun EmulatorScreen(
// screenWidthDp threshold. `compact` width (< 600 dp) is the phone / folded
// cover screen; `medium` (>= 600 dp) and `expanded` (>= 840 dp) are tablets,
// the Z Fold inner display, and resizable desktop windows.
val windowSizeClass = currentWindowAdaptiveInfo().windowSizeClass
// V2 rather than `currentWindowAdaptiveInfo()`, which is deprecated: the
// original cannot report the L and XL width classes. Nothing below changes
// -- both breakpoints tested here are "at least", so a window that now
// reports L or XL still satisfies EXPANDED. Confirmed against the artifact:
// `currentWindowAdaptiveInfoV2` is present in adaptive 1.3.0 and takes no
// caller-supplied parameters.
val windowSizeClass = currentWindowAdaptiveInfoV2().windowSizeClass
val isMediumWidth = windowSizeClass.isWidthAtLeastBreakpoint(WindowSizeClass.WIDTH_DP_MEDIUM_LOWER_BOUND)
val isExpandedWidth = windowSizeClass.isWidthAtLeastBreakpoint(WindowSizeClass.WIDTH_DP_EXPANDED_LOWER_BOUND)

Expand Down
Loading