Skip to content

Commit ed848fb

Browse files
authored
Merge pull request LambdaTest#964 from Aman1905/stage
updated the flutter android docs commands
2 parents ef8a9ea + e63c435 commit ed848fb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/getting-started-with-flutter-dart-android-automation.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ For testing, you need to build a Flutter app and test suite. You can create Flut
113113
Avoiding this step might result in **No Tests Ran** issue on the dashboard
114114
:::
115115

116+
To create APKs with optional Flutter parameters, first run the Flutter tests in verbose mode with the flutter cli. This allows you to see the Gradle command used internally to build the APKs.
117+
118+
For example, to use `--no-sound-null-safety` in your tests, run the following command.
119+
120+
```bash
121+
flutter run -v --no-sound-null-safety
122+
```
123+
124+
Next, look for gradlew execution in the logs. The above command generates a gradlew command in the logs that looks something like the following. To build your apk files, replace the parameter `YOUR_APP_PATH` with your actual path of the application in the following command:
125+
126+
```bash
127+
gradlew --full-stacktrace --info -Pverbose=true -Ptarget-platform=android-arm64 -Ptarget=YOUR_APP_PATH/lib/main.dart -Pbase-application-name=android.app.Application -Pdart-obfuscation=false -Pextra-front-end-options=--no-sound-null-safety -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug
128+
```
116129

117130
### Step 2: Upload Your Application
118131

0 commit comments

Comments
 (0)