Add instructions for getting code coverage in Android Studio (flutter/engine#51105)

small readme change, because for whatever reason we need to apply the comment from this hero https://github.com/robolectric/robolectric/issues/3023#issuecomment-1326870713 to make code coverage work 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
Gray Mackall 2024-02-29 16:02:29 -08:00 committed by GitHub
parent 49f7a86db8
commit dde1849f04

View File

@ -215,7 +215,12 @@ Android Studio:
![Example](https://github.com/flutter/flutter/assets/168174/02fe0e6f-f0c4-47b2-8dae-9aa0b9520503)
At this point you should be able to open Java files in Android Studio and get
code completion in the `io/flutter` folder (additional, undocumented work is
required for `test/io/flutter`). For example, `FlutterJNI.java`:
code completion in the `io/flutter` and `test/io/flutter` folders. For example, `FlutterJNI.java`:
![Example](https://github.com/flutter/flutter/assets/168174/387550d4-eab7-4097-9da3-7713a6ec4da7)
To get code coverage displayed in line: go to the test class you wish to run and
1. Right click > Modify Run Configuration...,
2. In the window that pops up click Modify options > Specify classes
and packages (under "code coverage").
3. In the new box that appears at the bottom of the window, click the + > Add package, and then add `io.flutter.*`.