Skip to content

[packages] Test with old AGP/Gradle in flutter/packages CI #125689

Closed
flutter/packages
#4005

Description

@stuartmorgan-g

In general we want to keep our example apps updated to recent versions of AGP and Gradle:

  • Ensures compatibility with recent versions of AGP/Gradle that many users will be using
  • Ensures compatibility with recent related toolchains (e.g., the latest version of Android Studio doesn't easily work with AGP 4.1)
  • In some cases, avoids hard-to-understand errors when updating dependencies

However, the downside is that we aren't testing with old versions of AGP; #125621 and #125482 are examples of recent cases where we broke people using old versions of AGP with changes that were fine on current versions. Ideally we should have testing in CI that builds all of our Android plugins in a project that uses the oldest version of AGP that flutter supports.

Activity

  1. added
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    platform-androidAndroid applications specifically
    packageflutter/packages repository. See also p: labels.
    on Apr 28, 2023
  2. stuartmorgan-g commented on Apr 28, 2023

    @stuartmorgan-g
    ContributorAuthor

    Currently my thought is to add options to the build-all-packages repo tooling command that let us set the AGP and Gradle versions, and run it a second time on Android. (Alternately we could replace the current version with this, since we test with recent tooling in the individual examples, but it's only a five-minute build or so, so duplicating it shouldn't be a big deal.)

  3. added
    P1High-priority issues at the top of the work list
    on Apr 28, 2023
  4. reidbaker commented on Apr 28, 2023

    @reidbaker
    Contributor

    I would love if tooling got the Lowest version of agp from a constant in packages/flutter_tools/lib/src/android/gradle_utils.dart. That is where I expect any tooling enforcement would get the value as well.

  5. stuartmorgan-g commented on May 15, 2023

    @stuartmorgan-g
    ContributorAuthor

    The lack of this just bit us again in #126710; we used an AGP 7.0 property without realizing it.

  6. github-actions commented on Jun 5, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.packageflutter/packages repository. See also p: labels.platform-androidAndroid applications specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions