Skip to content

Bump SDK levels for Google Play (target/compile 35, min 24)#42

Merged
madeye merged 6 commits into
feature/rust-tun2socksfrom
chore/play-sdk-bump-35
May 11, 2026
Merged

Bump SDK levels for Google Play (target/compile 35, min 24)#42
madeye merged 6 commits into
feature/rust-tun2socksfrom
chore/play-sdk-bump-35

Conversation

@madeye
Copy link
Copy Markdown
Owner

@madeye madeye commented May 11, 2026

Google Play has required apps to target API 35 (Android 15) since Nov 1, 2025; the current targetSdk 33 makes new uploads rejected. Bump the SDK levels and the toolchain required to compile against them.

Setting Before After
AGP 8.1.2 8.5.0
Gradle wrapper 8.4 8.7
Kotlin 1.9.10 1.9.25
Compose Compiler ext 1.5.3 1.5.15
compileSdk 34 35
minSdk 21 24
targetSdk 33 35

minSdk 24 covers ~97 % of active Play devices and matches the practical baseline for current AndroidX / Compose dependencies.

compileSdk 35 requires AGP 8.5+ — AGP 8.5.0 is the smallest jump that gets us there. JDK 17 and NDK 25.1.8937393 unchanged.

Couldn't validate locally (gradle's HTTP client can't tunnel through my local proxy cleanly); relying on CI to verify the toolchain combination compiles.

🤖 Generated with Claude Code

madeye and others added 6 commits May 11, 2026 18:55
Google Play has required apps to target API 35 (Android 15) since
Nov 1, 2025; the current targetSdk 33 means uploads are rejected.
Move to 35 across the board and raise the floor to API 24 (Android
7.0), which covers ~97% of active devices and matches the practical
minimum required by current AndroidX / Compose dependencies.

AGP 8.1.2 caps compileSdk at 34, so the toolchain has to move too.
Pick the smallest delta that supports compileSdk 35:

  - AGP            8.1.2  -> 8.5.0
  - Gradle wrapper 8.4    -> 8.7
  - Kotlin         1.9.10 -> 1.9.25
  - Compose Compiler ext  1.5.3  -> 1.5.15  (matches Kotlin 1.9.25)
  - compileSdk     34 -> 35
  - minSdk         21 -> 24
  - targetSdk      33 -> 35

JDK requirement (17) unchanged; NDK 25.1.8937393 unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two fixes bundled on the SDK-bump branch:

1. Mirrors: switch the Maven repos to Google's China mirror
   (https://dl.google.cn/dl/android/maven2/), Aliyun for Central
   and gradle-plugins, and Tencent Cloud for the Gradle binary
   distribution. Originals kept as fallbacks. Builds now work
   from networks where dl.google.com / services.gradle.org are
   unreachable directly.

2. Build failure: AGP 8.5 strictly rejects duplicated jniLibs
   sources, but rust-android-gradle 0.9.6 registers its
   build/rustJniLibs/<abi> output into jniLibs.srcDirs while the
   same path is also captured by AGP via the cargoBuild task,
   making mergeDebugJniLibFolders fail with "Duplicate
   resources" for libproxydroid_tun2socks.so on all four ABIs.
   Add a packagingOptions.jniLibs.pickFirsts rule for the .so.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The pickFirsts approach applies at packaging, but the failure happens
earlier in mergeJniLibFolders. Switch to setting
duplicatesStrategy = EXCLUDE on those merge Copy tasks, which is the
well-known workaround for rust-android-gradle 0.9.6 on AGP 8.5+.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MergeSourceSetFolders does not expose duplicatesStrategy. The actual
fix is to dedupe android.sourceSets.*.jniLibs.srcDirs at configure
time so each ABI's libproxydroid_tun2socks.so is only listed once.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The compileSdk 35 path forced AGP 8.5.0, which in turn broke
mergeJniLibFolders against rust-android-gradle 0.9.6 with "Duplicate
resources" for every ABI's libproxydroid_tun2socks.so. Neither
packagingOptions.jniLibs.pickFirsts (wrong phase) nor srcDirs
dedupe (duplicates come from AGP's auto-registration of cargoBuild
task outputs, not from srcDirs) resolves it, and no released
rust-android-gradle plugin is compatible with AGP 8.5+.

Sidestep the whole upgrade: AGP only requires compileSdk to be
high enough to reference APIs the code actually uses; targetSdk is
a manifest declaration Play reads, and targetSdk > compileSdk is
allowed. Set targetSdk to 35 (Play's current floor) on top of the
existing toolchain:

  - AGP                     stays 8.1.2
  - Gradle                  stays 8.4
  - Kotlin                  stays 1.9.10
  - Compose Compiler ext    stays 1.5.3
  - compileSdk              stays 34
  - minSdk                  21 -> 24
  - targetSdk               33 -> 35

Mirror changes (dl.google.cn, Aliyun, Tencent Cloud) are kept.
Drop the AGP-8.5-specific JNI dedupe workaround.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mirrors.cloud.tencent.com timed out from GitHub Actions runners.
services.gradle.org works from CI and is reachable from the user's
local network via their existing HTTPS proxy. Maven repo mirrors
(dl.google.cn / Aliyun) stay since they don't affect CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@madeye madeye merged commit e529caa into feature/rust-tun2socks May 11, 2026
4 checks passed
@madeye madeye deleted the chore/play-sdk-bump-35 branch May 11, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant