You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate to AGP 9.2.1 + Gradle 9.4.1 (new DSL, built-in Kotlin) (#61)
* Migrate to AGP 9.2.1 + Gradle 9.4.1 (new DSL, built-in Kotlin)
- buildSrc: Android Gradle Plugin 8.13.2 -> 9.2.1 (bundles KGP 2.3.10,
matching the pinned Kotlin version). Gradle wrapper 8.14.5 -> 9.4.1.
- app: drop the kotlin-android plugin; AGP 9 provides built-in Kotlin
(android.builtInKotlin defaults to true), so applying it would clash.
- Helpers.kt: adopt AGP 9's new DSL. Remove the legacy variant API
(AbstractAppExtension / applicationVariants / BaseVariantOutputImpl)
used for in-place APK output renaming, which no longer exists under
android.newDsl=true.
- Replace APK renaming with RenameApkTask, wired via
androidComponents.onVariants + artifacts.use(...).toListenTo(APK).
It copies each ABI split into build/outputs/renamed_apks/<variant>/
as NekoBox-<version>[-<abi>].apk and preserves output-metadata.json.
Public APIs only (no AGP internals, no Gradle impldep).
- CI workflows: point the arm64-v8a APK find/upload at renamed_apks.
- Fix minor Gradle 9 deprecations (tasks.register, jniLibs.directories,
rootProject.layout.buildDirectory).
KSP stays at 2.3.9 (latest; the 2.3 line dropped the -kspRev suffix and
is compatible with KGP 2.3.10). Verified locally: app:assembleOssDebug
builds and renameApksForOssDebug runs as part of assemble.
* Address CodeRabbit review: stricter task input + CI APK guard
- RenameApkTask.baseName: @internal -> @input so a version bump correctly
invalidates the task and re-copies APKs with the new name (avoids stale
output). Verified renameApksForOssDebug still runs automatically during a
clean app:assembleOssDebug (it listens on SingleArtifact.APK).
- CI workflows: fail loudly if no arm64-v8a APK is found under
renamed_apks instead of silently proceeding with an empty path.
* Address review bots: metadata, shell quoting, trailing newline
- RenameApkTask: drop builtArtifacts.save(outputDir). The metadata it
writes references the original un-renamed APK paths (outputs/apk/...),
not the NekoBox-* copies, so it would mislead any BuiltArtifactsLoader
consumer (Greptile P1). Nothing downstream consumes it, so omit it.
- CI workflows (all four): pipe find through 'head -n 1' and quote
dirname "$APK" to avoid multi-match / word-splitting corruption of
GITHUB_ENV (CodeRabbit + Greptile P2).
- Helpers.kt: add trailing newline (Greptile P2).
Re-verified app:assembleOssDebug builds and renameApksForOssDebug emits
the four NekoBox-<ver>-<abi>.apk files.
0 commit comments