Prepare for AGP 10 migration - #6181
Open
eliotcougar wants to merge 5 commits into
Open
eliotcougar wants to merge 5 commits into
eliotcougar wants to merge 5 commits into
Conversation
AcideFluorhydrique
added a commit
to AcideFluorhydrique/v2rayNG
that referenced
this pull request
Sep 14, 2026
2dust#6181 also drops the sed, and for a better reason: it adds imports for the public variant API, which moves the line the sed counts to. It passes the version as -PNDK_VERSION instead, with AGP's default applying when the property is absent. That default is the problem for reproducibility. Someone rebuilding a published APK runs Gradle without knowing about the property, gets AGP's default NDK, and strips the jniLibs with a different one, so the bytes differ with nothing to indicate why. Read the property and keep the pinned value as its default, so both hold: CI or a local build can override it, and a plain Gradle invocation still uses the NDK the release was built with.
eliotcougar
marked this pull request as ready for review
September 15, 2026 17:26
Use the current Gradle 9.8 distribution with its verified checksum, preserve the upstream JUnit Platform setup and dependency versions, and align local and CI NDK defaults with upstream r30. Retain the AGP migration, public variant API and distribution-specific artifact/version-code mapping. Validation: Play Store and F-Droid JVM suites and debug APKs passed; both release variants assembled. Version-code ranges, output names and four-ABI native packaging checked. Workflow lint passed apart from the inherited ubuntu-26.04 label unsupported by the installed actionlint catalog. Production signing and byte-for-byte reproducibility were not run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepare for AGP 10 by replacing legacy Android DSL and private variant APIs while retaining current upstream's AGP 9.4.1, Gradle 9.6.0, Kotlin/Compose compiler 2.4.20 and license plugin 0.9.91. The app stays on AGP 9; release shrinking remains disabled.
The branch includes upstream/master through
53fce9a8f. Dependency versions, version 2.3.8, application source and native-library revisions match that upstream base. The remaining diff is limited to build-system migration.Changes
applicationVariantsand privateApkVariantOutputImplcasts withandroidComponents.onVariants, public output properties andBuildConfigField. Retain the exactDISTRIBUTIONvalues, ABI filtering and universal APK behavior. Use the modernjniLibs.directoriesAPI.sedinsertion with anNDK_VERSIONjob value used for installation,NDK_HOMEand both Gradle invocations. Pin the ordinary Gradle default as well:The NDK strips native libraries, so a plain rebuild needs the release NDK to avoid differing native-library bytes. This preserves intentional overrides and implements the compatibility recommendation from #6219; its JDK pin and exact-tag workflow checks remain independent.
Preserved APK contract
v2rayNG_<version>_<abi>.apk4_000_000 + baseVersionCodev2rayNG_<version>-fdroid_<abi>.apk5_000_000 + 100 * baseVersionCode + abiOffsetF-Droid offsets remain universal=0, arm64-v8a=1, armeabi-v7a=2, x86_64=3 and x86=4. Package IDs, default four-ABI plus universal output, explicit
ABI_FILTERSbehavior and artifact-upload patterns are preserved.Validation
Validated at merge commit
cf329109, based on upstream53fce9a8f:libgojni.so, matching the native-stripping outputs.DISTRIBUTIONvalues verified in all four variants.d0c6c4aeand GitHub's release SHA-256; all four JNI ABIs and geodata verified. Existing HEV inputs retained for unchanged gitlink64cc609f.ubuntu-26.04runner-label exception;git diff --checkand instruction-file boundary checks passed.Not run: production signing CI, device runtime checks or independent cross-machine byte-for-byte reproducibility. The local builds reuse the official native release inputs; this PR prepares the build-system migration and aligns NDK selection without claiming complete reproducibility.