Skip to content

Commit

Permalink
simplify version name/code for Fdroid
Browse files Browse the repository at this point in the history
  • Loading branch information
mattvchandler committed Apr 16, 2019
1 parent 96a76f4 commit ac6650d
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

ext.ver_major = 1
ext.ver_minor = 0
ext.ver_patch = 5
ext.min_sdk = 19

private Integer gen_version_code()
{
// version code is <MIN_SDK>0<2-digit MAJOR><2-digit MINOR><2-digit PATCH>
return ext.min_sdk * 10000000 +
ext.ver_major * 10000 +
ext.ver_minor * 100 +
ext.ver_patch
}

private String gen_version_name()
{
return "${ext.ver_major}.${ext.ver_minor}.${ext.ver_patch}"
}

android {
compileSdkVersion 28
dataBinding.enabled = true
defaultConfig {
applicationId "org.mattvchandler.a2050"
minSdkVersion project.ext.min_sdk
minSdkVersion 19
targetSdkVersion 28
versionCode gen_version_code()
versionName gen_version_name()
versionName "1.0.5"
// version code is <MIN_SDK>0<2-digit MAJOR><2-digit MINOR><2-digit PATCH>
versionCode 190010005
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
externalNativeBuild {
Expand Down

0 comments on commit ac6650d

Please sign in to comment.