aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle8
1 files changed, 8 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle
index cbc4901..c9fdac7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -37,4 +37,12 @@ def gitCommitCount = 'git rev-list --count HEAD'.execute([], project.rootDir).te
ext {
versionName = "0.${gitCommitCount} α"
versionCode = Integer.parseInt("${gitCommitCount}")
+}
+
+task exportVersion(type: Exec) {
+ commandLine 'sh'
+ doLast {
+ file("$projectDir/version.txt").text = """$version"""
+ file("$projectDir/version_code.txt").text = """${gitCommitCount}"""
+ }
} \ No newline at end of file