fix(android): AGP 9.0 no longer supports proguard-android.txt#8315
Conversation
|
Thanks! This should fix #8314 |
|
@theproducer I also opened ionic-team/capacitor-plugins#2468 for the plugins in that repo if you have the ability to kick off the CI. |
proguard-android.txtproguard-android.txt
|
Do we want to merge this now? I would imagine we'd officially add support for a new AGP major version in a Capacitor Plugin major version. I don't know if there's precedent on this. |
I would think it should be merged in a minor version since it doesn't require an AGP upgrade, and without this change it is blocking AGP upgrades from downstream apps. The effect of this particular change is that r8 may perform optimizations it wasn't previously able to perform, but my thought would be if there are any optimizations that shouldn't be performed then the library's proguard rules should be updated so that it doesn't cause any breaking changes. I'm not sure what those might be for |
| buildTypes { | ||
| release { | ||
| minifyEnabled false | ||
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
There was a problem hiding this comment.
What I would do for now is remove this change on the template from this PR and open another one just for android-template so that we can ship that in a separate release (possibly with other AGP 9.0 changes).
We are updating our guidance for now to tell people to upgrade to 8.13.0 in the meanwhile: ionic-team/capacitor-docs#515
There was a problem hiding this comment.
That's true... I forgot I updated the template file, and that doesn't need to update (and should go in a major update)
This change replaces the default proguard file `proguard-android.txt` with `proguard-android-optimize.txt` which allows proguard optimizations.
85756cd to
bc03575
Compare
OS-pedrogustavobilro
left a comment
There was a problem hiding this comment.
✅ Makes more sense to have the change compartmentalised in two PRs.
Thanks for the contribution!
|
@capacitor/app still needs to be updated. Error is still present when using this package. |
|
@ShadeRF that's in ionic-team/capacitor-plugins#2468 |
proguard-android.txt
ionic-team/capacitor-google-maps#164
* docs: update maintenance badge year [skip ci] * feat(functions): add `timeout` option (capawesome-team#939) * feat(capawesome-team#813): make functions timeout configurable * chore(capawesome-team#813): format code * Update packages/functions/src/definitions.ts * docs: update `README.md` --------- Co-authored-by: Robin Genz <mail@robingenz.dev> * feat(functions): add `timeout` options * docs: update banner * fix(functions): Use emulator's regionOrCustomDomain option on native layers (capawesome-team#946) * Add FAQ section to messaging package README (capawesome-team#951) * Initial plan * Add FAQ section to messaging package README Add a new FAQ section below the API section in the messaging package's README.md explaining the difference between the Firebase Cloud Messaging plugin and the official Capacitor Push Notifications plugin. Ref: capawesome-team#336 Co-authored-by: robingenz <13857929+robingenz@users.noreply.github.com> * Apply suggestion from @robingenz --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: robingenz <13857929+robingenz@users.noreply.github.com> Co-authored-by: Robin Genz <mail@robingenz.dev> * fix: AGP 9.0 no longer supports `proguard-android.txt` (capawesome-team#952) See ionic-team/capacitor#8315 * chore(release): publish (capawesome-team#940) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: fix swiftlint scanning dependency files (capawesome-team#953) * fix(authentication): reject calls when provider is not configured (capawesome-team#954) * fix(authentication): reject calls when provider is not configured Add null/nil checks for auth provider handlers so that calling a sign-in or link method for a provider not listed in the Capacitor config rejects with a clear error message instead of crashing (Android) or silently hanging (iOS). * refactor(authentication): remove @objc from throwing phone methods These methods are only called from Swift, so @objc is unnecessary. * docs: add changeset * docs: update installation instructions to include AI-Assisted Setup * docs: add newsletter subscription information to README files * docs: format installation instructions for consistency across README files * docs: update installation instructions to include link to Capawesome Skills * feat(firestore): add support for Timestamp, GeoPoint, and FieldValue data types (capawesome-team#956) * feat(firestore): add support for Timestamp, GeoPoint, and FieldValue data types * fixes * fix(firestore): Added missing data serialization in the FirebaseFirestoreClientestoreClient. (capawesome-team#957) * fix(firestore): Added missing option serialization in the FirebaseFirestoreClient. * added changeset. * Delete .changeset/proud-donuts-mix.md --------- Co-authored-by: Robin Genz <mail@robingenz.dev> --------- Co-authored-by: Max Proshkin <20773529+mxs-dev@users.noreply.github.com> * chore: add Firebase skills * feat(analytics): add SPM trait to disable IDFA collection (capawesome-team#962) * feat(firestore): add `enablePersistence` and `disablePersistence` methods (capawesome-team#961) * feat(firestore): add enablePersistence and disablePersistence methods * fix(firestore): fix Android build error in enablePersistence * fix(firestore): use correct parameter types for deleteDocument and updateDocument * fix(firestore): fix iOS build error with optional parameter type * style: format * docs * docs: add missing changesets * feat(firestore): add `databaseId` configuration option (capawesome-team#966) * feat(firestore): add `databaseId` configuration option * refactor(firestore): store Firestore instance in local variable * fix(firestore): pass Firestore instance to query constraints on iOS * fix(firestore): add `FirebaseFirestoreConfig.swift` to Xcode project * feat(storage): add `downloadFile` method (capawesome-team#965) * feat(storage): add `downloadFile` method * fix(storage): add new Swift files to Xcode project * style(storage): fix import ordering * fix(storage): release call on error path and remove unused import * feat(analytics): add `logTransaction` method (capawesome-team#967) * feat(analytics): add `logTransaction` method * style: format code * fix(analytics): validate transaction ID before lookup * docs(analytics): clarify transactionId property description * feat(messaging): add `apnsTokenReceived` listener (capawesome-team#964) * feat(messaging): add `getApnsToken` method (capawesome-team#602) * fix(messaging): use uppercase hex for APNs token * fix(messaging): reject when APNs token unavailable and document hex format * refactor(messaging): extract APNs token error message to constant * revert: remove getApnsToken method in favor of listener approach * feat(messaging): add `apnsTokenReceived` listener (capawesome-team#602) * style(messaging): format code * style: format * Revert "style: format" This reverts commit 1e89351. * fix(analytics): improve logTransaction iOS implementation (capawesome-team#968) * docs: fix * chore(release): publish (capawesome-team#955) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs(storage): update "Usage" section * docs: add `--skill capacitor-plugins` flag to `npx skills add` command in all package READMEs (capawesome-team#969) * Initial plan * Replace npx skills add command with --skill capacitor-plugins flag in all package README.md files Agent-Logs-Url: https://github.com/capawesome-team/capacitor-firebase/sessions/ac09d506-6bd7-4349-9e71-7598bd53d4bd Co-authored-by: robingenz <13857929+robingenz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: robingenz <13857929+robingenz@users.noreply.github.com> * feat(remote-config): add setDefaults (capawesome-team#970) * Update README.md * chore(deps): npm audit fix * feat(remote-config): add `getAll()` method (capawesome-team#977) * ci(release): bump Node to 24 and drop npm self-update step Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(remote-config): expose value source on Web (capawesome-team#979) * feat(remote-config): expose value source on Web for getBoolean, getNumber, getString, and getAll * fix(remote-config): keep `source` optional to avoid breaking change * fix(firestore): handle `DocumentReference` fields in web deserializer (capawesome-team#981) Reading a document containing a `DocumentReference` field on web caused `RangeError: Maximum call stack size exceeded` because `deserializeData` had no branch for `DocumentReference` and fell through to the generic object branch, which recursed into the cyclic `_firestore` getter. Adds dedicated handling that produces a `{ __type__: 'documentReference', id, path }` marker (mirroring `Timestamp`/`GeoPoint`) and the symmetric `serializeMarker` case so a deserialized reference can be written back. Close capawesome-team#975 * docs(messaging): update link * ci(lock): update GH action [skip ci] * chore(tooling): add pre-commit prettier hook and consolidate prettier devDependency (capawesome-team#995) * chore(tooling): add pre-commit prettier hook and consolidate prettier devDependency * chore(tooling): bump CI Node to 24 and use --no-install for lint-staged hook * docs: add Firebase SDK update versioning policy * docs: document Swift Package Manager setup for plugins (capawesome-team#996) * fix(firestore): generate unique listener IDs on web (capawesome-team#989) * fix(firestore): generate unique listener IDs Listener IDs were derived from `Date.now()`, so listeners created in the same millisecond shared an ID and overwrote each other in the unsubscribes map, leaving the earlier ones unable to be removed. Replace the timestamp with a per-instance incrementing counter. The same issue was present in the storage plugin (downloadFile/uploadFile callback IDs) and is fixed here as well. Closes capawesome-team#986 * chore: add changeset * feat(firestore): support queries in getCountFromServer (capawesome-team#988) * feat(firestore): support queries in getCountFromServer * style: apply prettier formatting * feat(firestore): support serverTimestamps option on snapshot listeners (capawesome-team#993) * feat(firestore): add serverTimestamps option to snapshot listeners Expose Firestore's pending server timestamp behavior ('estimate' | 'previous' | 'none') as an option on addDocumentSnapshotListener, addCollectionSnapshotListener, and addCollectionGroupSnapshotListener on Web, Android, and iOS. Defaults to 'none' (current behavior). Closes capawesome-team#985 * fix(firestore): address PR review feedback - Normalize serverTimestamps on Web to match native fall-back behavior - Remove unused Nullable import in GetDocumentResult.java - Reformat definitions.ts with prettier 3.4.2 (pinned CI version) * feat(firestore): support DocumentReference, Bytes, and NaN/Infinity data types (capawesome-team#991) * feat(firestore): add support for `DocumentReference`, `Bytes`, and `NaN`/`Infinity` data types Closes capawesome-team#983 * fix(firestore): address review feedback and prettier formatting - iOS: preserve all array elements in `createJSArrayFromArray` (use `map` with `NSNull()` fallback) to avoid silent data corruption. - Web: chunk `Bytes.fromUint8Array` string build to avoid quadratic concat behavior. - Extract shared `serializeSpecialNumber`/`deserializeSpecialNumber` helpers into `special-number.ts` so `web.ts` and `utils.ts` stay in sync. - Apply pinned Prettier 3.4.2 formatting to `definitions.ts`. * fix(firestore): thread Firestore instance through getCountFromServer Resolve a semantic merge conflict: getCountFromServer (added on main) called createQueryCompositeFilterConstraintFromJSObject with the old signature, which this branch changed to require a Firestore instance for DocumentReference support. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(firestore): avoid crash on malformed special number on Android parseSpecialNumber fell back to Double.parseDouble, which throws on malformed bridge data. Default to NaN instead, matching the graceful fallback already used on iOS and Web. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(firestore): handle `limitToLast` query constraint on Android (capawesome-team#992) * docs(firestore): add FieldValue operations * feat(firestore): add `DocumentReference` class for reading and writing document reference fields (capawesome-team#999) * feat(firestore): add `DocumentReference` class for reading and writing document reference fields * fix(firestore): validate path in `DocumentReference.fromPath` * chore(release): publish (capawesome-team#971) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * ci: increase iOS test job timeout for full monorepo sync The upstream sync touches all packages, so SPM dependency installation exceeds the 10-minute job cap. Co-authored-by: Cursor <cursoragent@cursor.com> * ci: extend iOS test timeout to 45 minutes for full sync builds Co-authored-by: Cursor <cursoragent@cursor.com> * chore: fix formatting and relax swiftlint for upstream firestore growth Co-authored-by: Cursor <cursoragent@cursor.com> * fix: restore firestore getPluginVersion and sync native version strings Keep Capgo fork API contract after upstream merge by restoring the Firestore getPluginVersion bridge methods and aligning native plugin version constants with package 8.3.0. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: address review feedback and repair iOS pluginVersion strings - Fix malformed Swift pluginVersion literals that broke iOS CI - Sync all package versions to 8.3.0 and remove upstream funding metadata - Apply CodeRabbit fixes: timestamp nanoseconds, getCountFromServer serialization, weak analytics plugin ref, safe CallByUrl URL parsing, messaging README types reference, prettier bracketSameLine Co-authored-by: Cursor <cursoragent@cursor.com> * fix(app-check): align web getPluginVersion with package 8.3.0 Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Robin Genz <mail@robingenz.dev> Co-authored-by: Nico Genz <34741282+nicogenz@users.noreply.github.com> Co-authored-by: Julian Scheuchenzuber <js@lvl51.de> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: robingenz <13857929+robingenz@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Max Proshkin <20773529+mxs-dev@users.noreply.github.com> Co-authored-by: jacobg <jacobg@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This change replaces the default proguard file
proguard-android.txtwithproguard-android-optimize.txtwhich allows proguard optimizations.Alternatively, AGP 9 compatibility can be achieved by opting out of the change with
android.r8.globalOptionsInConsumerRules.disallowed=falsefixes: #8314