summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-09 21:54:27 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-09 21:54:27 -0600
commit89d9e30025349fa22873517d57f90b3f55d321b0 (patch)
tree29fc4b007102a9ac93e9dde7ad7b2fdf57fb0c8d
parentdfde86df76fe9865a1adf03c9e00d0749c5814ef (diff)
build: apply version to both modules
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--build.gradle2
-rw-r--r--tunnel/build.gradle4
-rw-r--r--ui/build.gradle4
-rw-r--r--version.gradle6
4 files changed, 12 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle
index 01ab9af5..b7e0b7cb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -48,3 +48,5 @@ tasks {
distributionType = Wrapper.DistributionType.ALL
}
}
+
+apply from: "version.gradle" \ No newline at end of file
diff --git a/tunnel/build.gradle b/tunnel/build.gradle
index deff4b15..63585bf7 100644
--- a/tunnel/build.gradle
+++ b/tunnel/build.gradle
@@ -10,8 +10,8 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
- versionCode 1
- versionName '1.0'
+ versionCode wireguardVersionCode
+ versionName wireguardVersionName
}
externalNativeBuild {
cmake {
diff --git a/ui/build.gradle b/ui/build.gradle
index 2827afc7..4ad3f4f2 100644
--- a/ui/build.gradle
+++ b/ui/build.gradle
@@ -22,8 +22,8 @@ android {
applicationId 'com.wireguard.android'
minSdkVersion 21
targetSdkVersion 29
- versionCode 465
- versionName '0.0.20200309'
+ versionCode wireguardVersionCode
+ versionName wireguardVersionName
buildConfigField 'int', 'MIN_SDK_VERSION', "$minSdkVersion.apiLevel"
}
// If the keystore file exists
diff --git a/version.gradle b/version.gradle
new file mode 100644
index 00000000..3ee263d1
--- /dev/null
+++ b/version.gradle
@@ -0,0 +1,6 @@
+buildscript {
+ ext {
+ wireguardVersionCode = 465
+ wireguardVersionName = '0.0.20200309'
+ }
+}