-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable pre-dexing and animations on your build server #1
Comments
Disable pre-dexing only on your build server First, in your root build.gradle add the following:
Then configure your build server to call Gradle tasks with
|
Disable pre-dexing on Travis-ci, compare results using a Build Matrix, use a bash one-liner to selectively export the environment variable, and avoid build timeouts using travis_wait:
|
You can print test results directly from the
I created the Currently only available on my temporal travis tests like the animation aware awesome branches ttt-aaa*.
|
The Espresso Team explained how to disable animations reflectively two years ago:
You can find different approaches on comments via gist files like this, see the forks, or this blog. |
Recently Ben Weiss, the owner of android-topeka project, added this nice AnimationAwareTestRule:
Tests now fail on devices with animations enabled since AnimationAwareTestRule was added. But this difficult to us to use CI build servers because we need to disable animations on emulators. |
I added three new test rules to the new
|
I splitted the original test rule into
|
I extended the previous helper combined with reflection to disable and enable animations and transitions.
|
I combined both solutions to save, disable and restore the exact animation scales.
You need to find the original test rule usages (Alt+F7) and replace it by the new rule you want to use. You also need to grant the SET_ANIMATION_SCALE permission for testing. |
In this case, following the commented gist files, create a new
I named it Add the next line at the bottom of your module build.gradle file:
And finally, in this case, add the next line to the already created debug manifest:
|
Test rules updated here. Two nice alternatives to disable animations and more: For Circle-CI users, this great post Setup Circle CI: Running Android Tests & Code Coverage Reports. Trying to get help to solve API 22 & 23 issues here and here: Cappuccino plugin also disables animations. API 22 issue is solved but API 23 emulators are bugged and need this fix. |
In general build system will always perform clean builds and this pre-dexing becomes a penalty.
Tests now fail on devices with animations enabled since
AnimationAwareTestRule
was added.I'll explain here my changes to disable pre-dexing and animations on your build server.
The text was updated successfully, but these errors were encountered: