Skip to content

[CP] Correct warning for compatible Java versions range given template AGP & Gradle versions #136388

Closed

Description

@camsim99

Issue Link

#135710 has a description of the problem (I don't have one but I can open one if needed)

Commit Hash

54cf286

Target

beta

PR Link

#135710 #136766

Changelog Description

Corrects the range of Java versions that flutter create will show if your Java version is incompatible with Flutter's template AGP & Gradle versions and/or is too new/old a version to be recognized by Flutter's tooling.

The range currently printed suggests that the upper bound is inclusive, whereas it is exclusive, so it may confuse developers.

Impacted Users

All Flutter devs running flutter create for something running on Android

Impact Description

They will see a range of Java versions that is confusing. It can easily be found out as incorrect by following documentation linked in the warning, but we can't guarantee devs will look there to confirm the range of Java versions that we suggest.

Workaround

Following the documentation linked in the warning to check the Java versions.

Risk

low

Test Coverage

yes

Validation Steps

There are many tests that prove that the range is exclusive (

testWithoutContext('getJavaVersionFor returns expected Java version range', () {
). I just forgot to format the warning appropriately in #131444, where I added the warning.

Activity

  1. itsjustkevin commented on Oct 17, 2023

    @itsjustkevin
    Contributor

    @reidbaker could you take a look at this cherry-pick and attach the cp: approved label if you agree?

  2. itsjustkevin commented on Oct 17, 2023

    @itsjustkevin
    Contributor

    @camsim99 can you link the cherry-pick PR you created?

  3. reidbaker commented on Oct 17, 2023

    @reidbaker
    Contributor

    Labels added for approval.

  4. camsim99 commented on Oct 17, 2023

    @camsim99
    ContributorAuthor

    @camsim99 can you link the cherry-pick PR you created?

    #135710 #136766

  5. added
    cp: merge-to-betaCherry-picks that should be merged to beta
    and removed
    cp: merge-to-stableCherry-picks that should be merged to stable
    on Oct 18, 2023
  6. github-actions commented on Nov 7, 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 Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

cp: approvedApproved cherry-pick requestcp: merge-to-betaCherry-picks that should be merged to betacp: mergedCherry-pick has been merged to the release branch.cp: reviewCherry-picks in the review queue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions