Browse to the location you downloaded intellij-java-google-style.xml in step 2, select the file, and click ‘Ok’.Highlight ‘Intellij IDEA code style XML’ and click ‘Ok’.Save intellij-java-google-style.xml as a file to your computer.To configure Android Studio to use Google’s style automatically, use the following steps: Sample projects can be built and installed onto a device or emulator using gradle: Glide’s sample projects are located in samples/. To verify your changes work and do not negatively affect performance, it’s also a good idea to try running one or more of Glide’s sample projects. Glide’s tests are not completely comprehensive. gradlew :instrumentation:connectedDebugAndroidTest Setup an emulator in Android Studio (I usually use x86 and API 26).As a result, I’d generally recommend running Glide’s instrumentation tests on an emulator. It’s now quite easy to add an emulator in Android Studio and x86 emulators are quite fast to boot and run. To run Glide’s instrumentation tests, you need to either plug in a real device, or add an emulator using Android Studio. If you do run regenerateTestResources, double check and make sure that the resulting files are sane and that you only see the changes you expected. gradlew :annotation:compiler:test:regenerateTestResources If you changed the output and the regression tests are failing, you can re-generate the test files by running: To test annotation processor changes run: gradlew :library:testDebugUnitTest Annotation Processor tests Glide’s unit tests are run as part of Glide’s build, so you can just use:įor a faster development cycle, you can also just run the unit tests for the main library with: Glide has two types of tests, unit tests that run on your local machine, and instrumentation tests that run on an emulator or device. To build the project, you typically need to run a single gradle command from the project root directory:
0 Comments
Leave a Reply. |