Skip to content

[Proposal] Reduce warnings in flutter.groovy file  #147122

Closed

Description

@AbdeMohlbi

Use case

right now (using flutter 3.19.6) when opening the android module in android studio the flutter.groovy file located inside ...\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy needs some refactoring and cleaning because it has more then 70 warnings right now (some libraries are deprecated,some unused methods ...):
i couldn't upload the code cz github has a limit in the body length so it's here

Proposal

the updated version can be found here
note that i haven't change or delete any function or messed any kind of logic just cleaned a bit and did as same as here to get rid of buildDir deprecation(there is now 31 warnings )

Activity

  1. AbdeMohlbi commented on Apr 20, 2024

    @AbdeMohlbi
    MemberAuthor

    also something strange is here (that ididn't touch )

    private String resolveProperty(String name, String defaultValue) {
            if (localProperties == null) {
                localProperties = readPropertiesIfExist(new File(project.projectDir.parentFile, "local.properties"))
            }
            String result
            if (project.hasProperty(name)) {
                result = project.property(name)
            }
            if (result == null) {
                result = localProperties.getProperty(name)
            }
            if (result == null) {
                result = defaultValue
            }
            return result
        }
  2. AbdeMohlbi commented on Apr 20, 2024

    @AbdeMohlbi
    MemberAuthor

    i've seen the flutter.groovy file inside the master branch and it has less errors and i've tried to make it better here(not tested yet i have some issues i'll try using the branch master and track it )

  3. added
    in triagePresently being triaged by the triage team
    on Apr 22, 2024
  4. huycozy commented on Apr 22, 2024

    @huycozy
    Member

    Thanks for the proposal. This is number of warnings I see when opening that file on Android Studio:

    • Flutter stable 3.19.6: 61 warnings
    • Flutter master channel 3.22.0-14.0.pre.67: 24 warnings
  5. added
    platform-androidAndroid applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    t: gradle"flutter build" and "flutter run" on Android
    c: proposalA detailed proposal for a change to Flutter
    team-toolOwned by Flutter Tool team
    and removed
    in triagePresently being triaged by the triage team
    on Apr 22, 2024
  6. changed the title [-]Clean and refactor the code inside flutter.groovy file [/-] [+]Reduce warnings in flutter.groovy file [/+] on Apr 22, 2024
  7. changed the title [-]Reduce warnings in flutter.groovy file [/-] [+][Proposal] Reduce warnings in flutter.groovy file [/+] on Apr 22, 2024
  8. added
    P2Important issues not at the top of the work list
    team-androidOwned by Android platform team
    and removed
    team-toolOwned by Flutter Tool team
    on Apr 22, 2024
  9. 10 remaining items

  10. unlocked this conversation on Oct 14, 2024
  11. AbdeMohlbi commented on May 15, 2025

    @AbdeMohlbi
    MemberAuthor

    Since this file does not exist any more ....

  12. github-actions commented on May 30, 2025

    @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.

  13. locked as resolved and limited conversation to collaborators on May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: proposalA detailed proposal for a change to Flutterplatform-androidAndroid applications specificallyr: invalidIssue is closed as not validt: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions