override minSdk only when using Karumi

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2020-11-04 12:42:11 +01:00
parent d686f202b7
commit 0826398c06
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
4 changed files with 8 additions and 2 deletions

View file

@ -185,6 +185,7 @@ steps:
GIT_TOKEN:
from_secret: GIT_TOKEN
ORG_GRADLE_PROJECT_coverage: ''
ORG_GRADLE_PROJECT_screenshot: ''
commands:
- scripts/checkIfRunDrone.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST || exit 0
- emulator-headless -avd android-27 -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 &
@ -239,6 +240,7 @@ steps:
GIT_TOKEN:
from_secret: GIT_TOKEN
ORG_GRADLE_PROJECT_coverage: ''
ORG_GRADLE_PROJECT_screenshot: ''
commands:
- scripts/checkIfRunDrone.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST || exit 0
- emulator-headless -avd android-27 -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 &

View file

@ -27,7 +27,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.14.2"
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
classpath 'com.karumi:shot:5.1.0'
classpath 'com.karumi:shot:5.3.0'
}
}
@ -156,7 +156,9 @@ android {
buildTypes {
debug {
testCoverageEnabled (project.hasProperty('coverage'))
minSdkVersion 21 // remove once we use 21 globally, only needed for karumi.shot
if (project.hasProperty('screenshot')) {
minSdkVersion 21 // remove once we use 21 globally, only needed for karumi.shot
}
}
}

View file

@ -71,6 +71,7 @@ if [[ $4 = "all" ]]; then
scripts/runAllScreenshotCombinations "noCI" "$1" "-Pandroid.testInstrumentationRunnerArguments.class=$class$method"
else
./gradlew --offline gplayDebugExecuteScreenshotTests $record \
-Pscreenshot=true \
-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest \
-Pandroid.testInstrumentationRunnerArguments.class=$class$method \
$darkMode \

View file

@ -22,6 +22,7 @@ do
if [[ $1 = "noCI" ]]; then
./gradlew --console plain gplayDebugExecuteScreenshotTests \
$record \
-Pscreenshot=true \
-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest \
-Pandroid.testInstrumentationRunnerArguments.COLOR="$color" \
-Pandroid.testInstrumentationRunnerArguments.DARKMODE="$darkMode" \