I propose a better error message when -Pdart-defines are not base64 encoded.
With Flutter 2.5 the following message is output:
"Error parsing assemble command: your generated configuration may be out of date. Try re-running 'flutter build ios' or the appropriate build command."
This message didn't help. Only a search for the message in the flutter_tools source revealed the true cause of the problem:
A message containing a hint about the required base64 encoding would be more helpful for many developers using integration tests with CI. They will probably use -Pdart-defines to add some parameters for their tests.
Steps to Reproduce
- in android folder of any project
- run ./gradlew app:assembleDebug -Pdart-defines=MY_ENV=whatever
Logs
./gradlew app:assembleDebug -Pdart-defines=MY_ENV=whatever
...
Task :app:compileFlutterBuildDebug FAILED
Error parsing assemble command: your generated configuration may be out of date. Try re-running 'flutter build ios' or the appropriate build command.
A gradlew task with correct base64 encoded dart-defines build without problem.
The issue is just the misleading error message.
./gradlew app:assembleDebug -Pdart-defines=TVlfRU5WPXdoYXRldmVy
...
BUILD SUCCESSFUL in 15s
I propose a better error message when -Pdart-defines are not base64 encoded.
With Flutter 2.5 the following message is output:
"Error parsing assemble command: your generated configuration may be out of date. Try re-running 'flutter build ios' or the appropriate build command."
This message didn't help. Only a search for the message in the flutter_tools source revealed the true cause of the problem:
A message containing a hint about the required base64 encoding would be more helpful for many developers using integration tests with CI. They will probably use -Pdart-defines to add some parameters for their tests.
Steps to Reproduce
Logs
./gradlew app:assembleDebug -Pdart-defines=MY_ENV=whatever
...
A gradlew task with correct base64 encoded dart-defines build without problem.
The issue is just the misleading error message.
./gradlew app:assembleDebug -Pdart-defines=TVlfRU5WPXdoYXRldmVy
...
BUILD SUCCESSFUL in 15s