You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inject proguard rules after Dart AOT compilation to gradle #154170
Once the Dart code is compiled in AOT mode, we can understand which methods and classes are used from the jnigen generated bindings and can use that to generate proguard rules. The tree-shaking information is accessible through hook/link.dart.
I'm not sure how the release build pipeline looks like, for example if the process starts with gradle can we then inject the generated proguard rules mid build?
So that means that we only know about the proguard rules halfway during the Gradle build. (Flutter assemble invokes the build and link hooks in the native assets target: lib/src/build_system/targets/native_assets.dart)
I'm not sure how the release build pipeline looks like, for example if the process starts with gradle can we then inject the generated proguard rules mid build?
I'm not sure how the release build pipeline looks like, for example if the process starts with gradle can we then inject the generated proguard rules mid build?
Yes, I believe this should be possible.
The current general ordering of steps is (with more before and after):
...
@HosseinYousefi what parts of this feature are you wanting team-android to do? @gmackall mentioned in triage that this is likely tracking work you are actively doing.
@HosseinYousefi what parts of this feature are you wanting team-android to do? @gmackall mentioned in triage that this is likely tracking work you are actively doing.
I'm currently working on #154165. I'll work on this next. I'll reach out to y'all if I had problems.
This issue is assigned to @HosseinYousefi but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
This issue is assigned to @liamappelbe but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
This issue was assigned to @liamappelbe but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
Activity
[-]Inject proguard rules[/-][+]Inject proguard rules after Dart AOT compilation to gradle[/+]dcharkes commentedon Aug 27, 2024
We need to support two flows:
flutter run --release//flutter buildflutter assembleWe need to support two flows:
flutter assembleSo that means that we only know about the proguard rules halfway during the Gradle build. (Flutter assemble invokes the build and link hooks in the native assets target:
lib/src/build_system/targets/native_assets.dart)I don't know much about Gradle.
gmackall commentedon Aug 27, 2024
Yes, I believe this should be possible.
The current general ordering of steps is (with more before and after):
...
FlutterPlugin(a Gradle plugin).FlutterPlugininvokes the Flutter tool again....
See the somewhat outdated go/flutter-build-android-app-lifecycle (flutter.gradle -> flutter.groovy).
Also, we currently configure proguard rules here, as a breadcrumb.
reidbaker commentedon Aug 27, 2024
I would add that google/android has a default proguard file that is included as part of AGP.
https://www.zacsweers.dev/android-proguard-rules/
reidbaker commentedon Sep 5, 2024
@HosseinYousefi what parts of this feature are you wanting team-android to do? @gmackall mentioned in triage that this is likely tracking work you are actively doing.
HosseinYousefi commentedon Sep 5, 2024
I'm currently working on #154165. I'll work on this next. I'll reach out to y'all if I had problems.
flutter-triage-bot commentedon Jan 15, 2026
This issue is assigned to @HosseinYousefi but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
mkustermann commentedon Jan 15, 2026
/cc @goderbauer Maybe you can find a new owner for this?
flutter-triage-bot commentedon May 21, 2026
This issue is assigned to @liamappelbe but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
flutter-triage-bot commentedon Aug 6, 2026
This issue was assigned to @liamappelbe but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
gmackall commentedon Aug 11, 2026
From android triage: cc @goderbauer and @liamappelbe
should this find a new owner? Or should we swap labels off of the android team?