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 1915902 commit 469090c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 = 2
ext.ver_minor = 0
ext.ver_patch = 2
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.progressbars"
minSdkVersion project.ext.min_sdk
minSdkVersion 19
targetSdkVersion 28
versionCode gen_version_code()
versionName gen_version_name()
versionName "2.0.2"
// version code is <MIN_SDK>0<2-digit MAJOR><2-digit MINOR><2-digit PATCH>
versionCode 190020002
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down

0 comments on commit 469090c

Please sign in to comment.