Disable animations when testing

This commit is contained in:
2016-03-13 14:12:13 -04:00
parent 1a18bb939d
commit 9156bba267
5 changed files with 137 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "org.isoron.uhabits"
@@ -43,3 +43,13 @@ dependencies {
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.1'
}
task grantAnimationPermission(type: Exec, dependsOn: 'installDebug') {
commandLine "adb shell pm grant org.isoron.uhabits android.permission.SET_ANIMATION_SCALE".split(' ')
}
tasks.whenTaskAdded { task ->
if (task.name.startsWith('connected')) {
task.dependsOn grantAnimationPermission
}
}