From e3f713aae157c65af231b1417bea1f8259b8294e Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 1 Mar 2020 23:47:39 -0800 Subject: Avoid version check on travis --- app/build.gradle | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'app/build.gradle') 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()] + } } } } -- cgit v1.2.3