summaryrefslogtreecommitdiffhomepage
path: root/ui/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'ui/build.gradle.kts')
-rw-r--r--ui/build.gradle.kts18
1 files changed, 16 insertions, 2 deletions
diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts
index 136c636a..16b82f70 100644
--- a/ui/build.gradle.kts
+++ b/ui/build.gradle.kts
@@ -8,11 +8,13 @@ import com.android.build.gradle.tasks.ExtractSupportedLocalesTask
System.setProperty("com.android.tools.r8.disableApiModeling", "1")
val pkg: String = providers.gradleProperty("wireguardPackageName").get()
+val appID: String = providers.gradleProperty("wireguardApplicationID").get()
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
+ alias(libs.plugins.ajoberstar.grgit)
}
android {
@@ -24,11 +26,14 @@ android {
}
namespace = pkg
defaultConfig {
- applicationId = pkg
+ applicationId = appID
minSdk = 21
targetSdk = 33
versionCode = providers.gradleProperty("wireguardVersionCode").get().toInt()
- versionName = providers.gradleProperty("wireguardVersionName").get()
+ versionName = grgit.describe {
+ tags = true
+ always = true
+ }.replace('-', '.')
buildConfigField("int", "MIN_SDK_VERSION", minSdk.toString())
}
compileOptions {
@@ -36,6 +41,14 @@ android {
targetCompatibility = JavaVersion.VERSION_17
isCoreLibraryDesugaringEnabled = true
}
+ signingConfigs {
+ named("debug") {
+ storeFile = File("/src/wireguard-android/keystore/debug.keystore")
+ storePassword = "android"
+ keyAlias = "androiddebugkey"
+ keyPassword = "android"
+ }
+ }
buildTypes {
release {
isMinifyEnabled = true
@@ -52,6 +65,7 @@ android {
debug {
applicationIdSuffix = ".debug"
versionNameSuffix = "-debug"
+ signingConfig = signingConfigs.getByName("debug")
}
create("googleplay") {
initWith(getByName("release"))