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
[Proposal] Reduce warnings in flutter.groovy file #147122
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 )
also something strange is here (that ididn't touch )
privateStringresolveProperty(Stringname, StringdefaultValue) {
if (localProperties ==null) {
localProperties = readPropertiesIfExist(newFile(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
}
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 )
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.
Activity
AbdeMohlbi commentedon Apr 20, 2024
also something strange is here (that ididn't touch )
AbdeMohlbi commentedon Apr 20, 2024
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 )
huycozy commentedon Apr 22, 2024
Thanks for the proposal. This is number of warnings I see when opening that file on Android Studio:
3.19.6: 61 warnings3.22.0-14.0.pre.67: 24 warnings[-]Clean and refactor the code inside flutter.groovy file [/-][+]Reduce warnings in flutter.groovy file [/+][-]Reduce warnings in flutter.groovy file [/-][+][Proposal] Reduce warnings in flutter.groovy file [/+]10 remaining items
reduce warnings inside flutter.groovy file (flutter#152073)
fix `Consider using 'named' to avoid unnecessary configuration` insid…
small update in regex in flutter.groovy (#156484)
Update flutter.groovy to catch unknown task exception when finding ap…
small update in regex in flutter.groovy (flutter#156484)
Readability change to `flutter.groovy`, align on null assignment, red…
Removing redundant backticks in `flutter\packages\flutter_tools\gradl…
fix fialing lint `Consider using 'register' to avoid unnecessary conf…
AbdeMohlbi commentedon May 15, 2025
Since this file does not exist any more ....
github-actions commentedon May 30, 2025
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 -vand a minimal reproduction of the issue.