Skip to content

drop deprecated android.nonFinalResIds opt-out#80

Open
kiftio wants to merge 2 commits into
target-jvm-11from
drop-non-final-res-ids-opt-out
Open

drop deprecated android.nonFinalResIds opt-out#80
kiftio wants to merge 2 commits into
target-jvm-11from
drop-non-final-res-ids-opt-out

Conversation

@kiftio
Copy link
Copy Markdown
Contributor

@kiftio kiftio commented May 13, 2026

Summary

Removes android.nonFinalResIds=false from both gradle.properties files. AGP 9 deprecates this option and will remove it in AGP 10. The new default is true (non-final R-class constants), which is fine for this codebase.

Changes

  • gradle.properties: remove android.nonFinalResIds=false.
  • samples/MobileBuyIntegration/gradle.properties: remove android.nonFinalResIds=false.

Why now

  • AGP 9 deprecation we can clear independently of the BCV/KGP-driven builtInKotlin=false and newDsl=false opt-outs, which still need to stay until upstream catches up.
  • Avoids carrying an actionable warning indefinitely in build output.

Consumer impact

None.

  • R-class constants becoming non-final only breaks Java switch (R.*) { case ... } statements (Java requires compile-time constants as case labels).
  • The library is Kotlin-only — no Java code in lib/src/main. The sample contains zero .java files.
  • The AAR's published R class (com.shopify.checkoutkit.R) is library-internal; third-party consumers don't reference our R values.

Audit run before flipping: zero switch statements on R constants across lib/ and samples/.

Test plan

  • ./gradlew :lib:clean :lib:test :lib:detekt :lib:lintRelease :lib:apiCheck :lib:assembleRelease — green
  • Sample app ./gradlew assembleDebug from samples/MobileBuyIntegration/ — green
  • WARNING: The option setting 'android.nonFinalResIds=false' is deprecated no longer appears in build output

What changes are you making?

How to test


Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in platforms/swift/ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated platforms/swift/CHANGELOG.md
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Android version?
  • I have bumped the versionName in platforms/android/lib/build.gradle
  • I have updated platforms/android/CHANGELOG.md
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

AGP 9 deprecates the android.nonFinalResIds option and will remove it
in AGP 10; the new default is true (non-final R-class constants).
Library is a Kotlin-only consumer with no Java switch statements on
R.*, so flipping to the default is a no-op for both lib/ and the
sample.
@kiftio kiftio requested a review from a team as a code owner May 13, 2026 12:12
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