aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-01-20 21:58:59 -0500
committerGitHub <noreply@github.com>2018-01-20 21:58:59 -0500
commit097d2e0a393294bb239a2455a9a75a405a220fad (patch)
treea736d7ff07bad86724dbad846d51e3ad867a22c2
parent87aba7cff2e01cc71a2e319ccc96cc1e159bdcd3 (diff)
downloadkau-097d2e0a393294bb239a2455a9a75a405a220fad.tar.gz
kau-097d2e0a393294bb239a2455a9a75a405a220fad.tar.bz2
kau-097d2e0a393294bb239a2455a9a75a405a220fad.zip
Add back git tag versioning (#129)
-rw-r--r--.travis.yml1
-rw-r--r--about/build.gradle5
-rw-r--r--adapter/build.gradle3
-rw-r--r--android-lib.gradle9
-rw-r--r--build.gradle12
-rw-r--r--colorpicker/build.gradle3
-rw-r--r--core-ui/build.gradle3
-rw-r--r--core/build.gradle3
-rw-r--r--docs/Changelog.md3
-rw-r--r--gradle.properties2
-rw-r--r--kpref-activity/build.gradle3
-rw-r--r--mediapicker/build.gradle3
-rw-r--r--sample/build.gradle12
-rw-r--r--searchview/build.gradle3
14 files changed, 46 insertions, 19 deletions
diff --git a/.travis.yml b/.travis.yml
index c0469ef..3ebc688 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,6 +30,7 @@ before_script:
- adb shell input keyevent 82 &
script:
- chmod +x gradlew
+- "./gradlew --quiet androidGitVersion"
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then ./gradlew lintRelease publishRelease; else ./gradlew lintRelease test; fi
branches:
except:
diff --git a/about/build.gradle b/about/build.gradle
index 4794178..af87f1e 100644
--- a/about/build.gradle
+++ b/about/build.gradle
@@ -1,8 +1,11 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
apply from: '../android-lib.gradle'
android {
defaultConfig {
- resValue "string", "kau_version_code", project.VERSION_NAME
+ resValue "string", "kau_version_code", androidGitVersion.name()
}
}
diff --git a/adapter/build.gradle b/adapter/build.gradle
index 97d70f5..e4dd045 100644
--- a/adapter/build.gradle
+++ b/adapter/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
ext.kauSubModuleMinSdk = project.CORE_MIN_SDK
apply from: '../android-lib.gradle'
diff --git a/android-lib.gradle b/android-lib.gradle
index d3651dc..123aec7 100644
--- a/android-lib.gradle
+++ b/android-lib.gradle
@@ -8,6 +8,11 @@ android {
compileSdkVersion Integer.parseInt(project.TARGET_SDK)
buildToolsVersion project.BUILD_TOOLS
+ androidGitVersion {
+ codeFormat = 'MMNNPPXX'
+ format = '%tag%%.count%%-commit%'
+ }
+
def kauMinSdk = project.MIN_SDK
if (project.hasProperty('kauSubModuleMinSdk'))
kauMinSdk = kauSubModuleMinSdk
@@ -21,8 +26,8 @@ android {
defaultConfig {
minSdkVersion Integer.parseInt(kauMinSdk)
targetSdkVersion Integer.parseInt(project.TARGET_SDK)
- versionName project.VERSION_NAME
- versionCode project.VERSION_CODE
+ versionName androidGitVersion.name()
+ versionCode androidGitVersion.code()
consumerProguardFiles 'progress-proguard.txt'
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
diff --git a/build.gradle b/build.gradle
index 73ca19e..0905ce0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,18 +16,6 @@ buildscript {
}
}
-def portions = project.VERSION_NAME.tokenize('.')
-int code = 0
-for (i in 1..4) {
- if (portions.size() >= i && portions[i - 1].isInteger())
- code += portions[i - 1].toInteger()
- code *= 100
-}
-code /= 100
-println "KAU Project Version Name: " + project.VERSION_NAME
-println "KAU Project Version Code: " + code
-project.ext.VERSION_CODE = code
-
task clean(type: Delete) {
delete rootProject.buildDir
}
diff --git a/colorpicker/build.gradle b/colorpicker/build.gradle
index 9310be3..fdf5728 100644
--- a/colorpicker/build.gradle
+++ b/colorpicker/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
ext.kauSubModuleResourcePrefix = "kau_color_"
ext.kauSubModuleMinSdk = project.CORE_MIN_SDK
diff --git a/core-ui/build.gradle b/core-ui/build.gradle
index 1e7a58b..58cde79 100644
--- a/core-ui/build.gradle
+++ b/core-ui/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
ext.kauSubModuleMinSdk = project.CORE_MIN_SDK
apply from: '../android-lib.gradle'
diff --git a/core/build.gradle b/core/build.gradle
index 8879c62..99ea569 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
ext.kauSubModuleMinSdk = project.CORE_MIN_SDK
apply from: '../android-lib.gradle'
diff --git a/docs/Changelog.md b/docs/Changelog.md
index a9b2178..1c5500e 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -1,5 +1,8 @@
# Changelog
+## v3.6.3
+* Add Chinese, Indonesian, Norwegian, Polish, Thai, and Turkish translations
+
## v3.6.2
* :core: Pass null instead of bundle if bundle is empty for startActivity
* :core: Support sending attachments for email
diff --git a/gradle.properties b/gradle.properties
index eba1837..c55bb91 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -23,8 +23,6 @@ TARGET_SDK=27
BUILD_TOOLS=27.0.2
ANDROID_SUPPORT_LIBS=27.0.2
-VERSION_NAME=3.6.1.0
-
KOTLIN=1.2.20
ABOUT_LIBRARIES=6.0.1
ANKO=0.10.4
diff --git a/kpref-activity/build.gradle b/kpref-activity/build.gradle
index 62c069d..7cd923b 100644
--- a/kpref-activity/build.gradle
+++ b/kpref-activity/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
ext.kauSubModuleMinSdk = project.CORE_MIN_SDK
ext.kauSubModuleResourcePrefix = "kau_pref_"
diff --git a/mediapicker/build.gradle b/mediapicker/build.gradle
index 1c6884d..aff10c4 100644
--- a/mediapicker/build.gradle
+++ b/mediapicker/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
ext.kauSubModuleMinSdk = project.CORE_MIN_SDK
apply from: '../android-lib.gradle'
diff --git a/sample/build.gradle b/sample/build.gradle
index 6526306..bfe5182 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.github.triplet.play'
@@ -14,12 +17,17 @@ android {
compileSdkVersion Integer.parseInt(project.TARGET_SDK)
buildToolsVersion project.BUILD_TOOLS
+ androidGitVersion {
+ codeFormat = 'MMNNPPXX'
+ format = '%tag%%.count%%-commit%'
+ }
+
defaultConfig {
applicationId "ca.allanwang.kau.sample"
minSdkVersion Integer.parseInt(project.MIN_SDK)
targetSdkVersion Integer.parseInt(project.TARGET_SDK)
- versionName project.VERSION_NAME
- versionCode project.VERSION_CODE
+ versionName androidGitVersion.name()
+ versionCode androidGitVersion.code()
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
diff --git a/searchview/build.gradle b/searchview/build.gradle
index 39a3662..edf3f9c 100644
--- a/searchview/build.gradle
+++ b/searchview/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
ext.kauSubModuleResourcePrefix = "kau_search_"
apply from: '../android-lib.gradle'