Gradle plugin that set version of Android project by date and Git commit status automatically.
Add following snippets to your root project's build.gradle
file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.yogpc:auto-version:0.0.+'
}
}
and apply following diffs to your app
project's build.gradle
file:
apply plugin: 'com.android.application'
+apply plugin: 'auto-version'
android {
defaultConfig {
- versionCode 1
- versionName "0.0.1"
}
}
and add following snippets to gradle.properties
file:
versionName=0.0.1