Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
Hardcode version for F-Droid
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanWang committed Feb 6, 2020
1 parent a6dd7e3 commit 2d54d58
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@ android {
applicationId "${project.APP_GROUP}.${project.APP_ID.toLowerCase(Locale.CANADA)}"
minSdkVersion kau.Versions.minSdk
targetSdkVersion Versions.targetSdk
// versionCode 2040300
versionCode androidGitVersion.code()
// versionName 2.4.3
versionName androidGitVersion.name()
versionCode 2040300
// versionCode androidGitVersion.code()
versionName '2.4.3'
// 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 "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
Expand Down

0 comments on commit 2d54d58

Please sign in to comment.