flutter / flutter/flutter

[AGP 9] Restructure addFlutterTasks for separate library and app plugin logic

Open
#184,409 0 comments 0 reactions 0 assignees View on GitHub
P2 platform-android t: gradle team-android tool triaged-android
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

## Background
AGP 9 transitions exclusively to the new DSL interfaces and hides the legacy variant API. To opt into the new DSL, the Flutter Gradle Plugin should align with the plugin structure that AGP uses. Separating the task addition logic into distinct library and application execution paths will make the rest of the migration easier to apply.

## Work
- [ ] Restructure `addFlutterTasks` to separate the code that runs on libraries from the code that runs on apps.
- [ ] Evaluate keeping a single method that handles shared logic in a "both" section first, followed by the specific library and app sections.
- [ ] Add tests to validate the updated logic.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.