aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-03-01 23:47:39 -0800
committerAllan Wang <me@allanwang.ca>2020-03-01 23:47:39 -0800
commite3f713aae157c65af231b1417bea1f8259b8294e (patch)
treeb5e57a2abc9304caeb846bd8d55b1bae0dc4f5fe /app
parent2798abf62bd5960abebf6e3b917b9013aa468134 (diff)
downloadfrost-e3f713aae157c65af231b1417bea1f8259b8294e.tar.gz
frost-e3f713aae157c65af231b1417bea1f8259b8294e.tar.bz2
frost-e3f713aae157c65af231b1417bea1f8259b8294e.zip
Avoid version check on travis
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle26
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt2
2 files changed, 15 insertions, 13 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 197fe10f..fde143ad 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -40,18 +40,20 @@ android {
versionName '2.4.4'
// versionName androidGitVersion.name()
- // Verification for F-Droid builds
- if (versionCode != androidGitVersion.code()) {
- throw new GradleException("Version code mismatch, expected ${androidGitVersion.code()}, got $versionCode")
- }
- if (versionName != androidGitVersion.name()) {
- throw new GradleException("Version name mismatch, expected ${androidGitVersion.name()}, got $versionName")
- }
- multiDexEnabled true
- testInstrumentationRunner "com.pitchedapps.frost.FrostTestRunner"
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = ["room.schemaLocation": "$projectDir/src/schemas".toString()]
+ if (System.getenv('TRAVIS') != 'true') {
+ // Verification for F-Droid builds
+ if (versionCode != androidGitVersion.code()) {
+ throw new GradleException("Version code mismatch, expected ${androidGitVersion.code()}, got $versionCode")
+ }
+ if (versionName != androidGitVersion.name()) {
+ throw new GradleException("Version name mismatch, expected ${androidGitVersion.name()}, got $versionName")
+ }
+ multiDexEnabled true
+ testInstrumentationRunner "com.pitchedapps.frost.FrostTestRunner"
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = ["room.schemaLocation": "$projectDir/src/schemas".toString()]
+ }
}
}
}
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt
index b582baf6..a23cac0b 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt
@@ -28,6 +28,7 @@ import com.pitchedapps.frost.utils.ARG_TEXT
import com.pitchedapps.frost.utils.isIndirectImageUrl
import kotlin.test.assertEquals
import kotlin.test.assertFalse
+import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue
import okhttp3.internal.closeQuietly
@@ -45,7 +46,6 @@ import org.junit.rules.RuleChain
import org.junit.rules.TestRule
import org.junit.rules.Timeout
import org.junit.runner.RunWith
-import kotlin.test.assertNotNull
@RunWith(AndroidJUnit4::class)
class ImageActivityTest {