[flutter_tools] Write dart-defines to local.properties to avoid windows cmd line length restriction#186352
Conversation
There was a problem hiding this comment.
Code Review
This pull request moves dart-defines from command-line arguments to the local.properties file for Android builds to prevent exceeding command-line length limits on Windows. It adds an encodedDartDefines property to the BuildInfo class and updates the Gradle plugin and utility logic accordingly. Review feedback recommends generalizing the documentation in the platform-agnostic BuildInfo class to avoid platform-specific references and broken links.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request transitions the handling of dart-defines for Android by writing them to local.properties and promoting them to Gradle project properties, rather than passing them as command-line arguments. Feedback highlights critical syntax errors in Dart map initializations, a potential UninitializedPropertyAccessException in the Kotlin plugin code, and a violation of the style guide regarding the removal of documentation for a public method.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the handling of dart-defines for Android builds by moving them from Gradle configuration arguments to local.properties. The FlutterPlugin now promotes these values to Gradle project properties, and corresponding tests have been updated to verify this new implementation. I have no feedback to provide.
#186351
This PR solves an issue where big json file passed as --dart-define-from-file would cause an error in gradle on Windows :
This will instead write dart-defines in local.properties instead of being passed as argument to flutter.bat.
Pre-launch Checklist
///).