Plugin(s)
Version
8.0.2 (eventually 9)
Platform(s)
Current behavior
Summary
@capawesome/capacitor-app-update@8.0.2 fails to build when the host project uses Android Gradle
Plugin 9.0+. AGP 9.0 removed support for getDefaultProguardFile('proguard-android.txt') and now
requires proguard-android-optimize.txt instead.
Error
A problem occurred evaluating project ':capawesome-capacitor-app-update'.
getDefaultProguardFile('proguard-android.txt') is no longer supported since it includes
-dontoptimize, which prevents R8 from performing many optimizations. Instead use
getDefaultProguardFile('proguard-android-optimize.txt'), and if needed, temporarily use
-dontoptimize in a custom keep rule file while fixing breakages.
Root Cause
https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/capacitor-app-update/andr
oid/build.gradle#L35:
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
Suggested Fix
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
This is a backwards-compatible change — proguard-android-optimize.txt has been available since
AGP 3.4 and works on all AGP versions currently in use. It simply enables R8 optimizations that
proguard-android.txt was disabling.
Context
- AGP 9.0.1 was released alongside Android Studio Narwhal Feature Drop (2025.2.1)
- Capacitor 8 currently ships with AGP 8.13.0, so this isn't urgent yet, but projects that track
the latest AGP or upgrade Android Studio will hit this
- The same proguard-android.txt deprecation was a warning in AGP 8.x and became a hard error in
9.0
Environment
- @capawesome/capacitor-app-update: 8.0.2
- @capacitor/android: 8.1.0
- AGP: 9.0.1
- Gradle: 9.2.1
Expected behavior
The plugin should build successfully with AGP 9.0+ without requiring any workarounds from the host project.
Reproduction
https://github.com/capawesome-team/capacitor-plugins
Steps to reproduce
- Create a Capacitor 8 project with @capawesome/capacitor-app-update@8.0.2
- Update android/build.gradle to AGP 9.0.1: classpath 'com.android.tools.build:gradle:9.0.1'
- Update Gradle wrapper to 9.2.1
- Run ./gradlew assembleDebug
- Build fails at project evaluation with the proguard-android.txt error
Other information
Wow, lots of hurdles to create a bug ticket!
Capacitor doctor
Latest Dependencies:
@capacitor/cli: 8.1.0
@capacitor/core: 8.1.0
@capacitor/android: 8.1.0
@capacitor/ios: 8.1.0
Installed Dependencies:
@capacitor/cli: 8.1.0
@capacitor/core: 8.1.0
@capacitor/android: 8.1.0
@capacitor/ios: 8.1.0
[success] Android looking great! 👌
[success] iOS looking great! 👌
Before submitting
Plugin(s)
Version
8.0.2 (eventually 9)
Platform(s)
Current behavior
Summary
@capawesome/capacitor-app-update@8.0.2 fails to build when the host project uses Android Gradle
Plugin 9.0+. AGP 9.0 removed support for getDefaultProguardFile('proguard-android.txt') and now
requires proguard-android-optimize.txt instead.
Error
A problem occurred evaluating project ':capawesome-capacitor-app-update'.
Root Cause
https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/capacitor-app-update/andr
oid/build.gradle#L35:
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
Suggested Fix
This is a backwards-compatible change — proguard-android-optimize.txt has been available since
AGP 3.4 and works on all AGP versions currently in use. It simply enables R8 optimizations that
proguard-android.txt was disabling.
Context
the latest AGP or upgrade Android Studio will hit this
9.0
Environment
Expected behavior
The plugin should build successfully with AGP 9.0+ without requiring any workarounds from the host project.
Reproduction
https://github.com/capawesome-team/capacitor-plugins
Steps to reproduce
Other information
Wow, lots of hurdles to create a bug ticket!
Capacitor doctor
Latest Dependencies:
@capacitor/cli: 8.1.0
@capacitor/core: 8.1.0
@capacitor/android: 8.1.0
@capacitor/ios: 8.1.0
Installed Dependencies:
@capacitor/cli: 8.1.0
@capacitor/core: 8.1.0
@capacitor/android: 8.1.0
@capacitor/ios: 8.1.0
[success] Android looking great! 👌
[success] iOS looking great! 👌
Before submitting