diff options
Diffstat (limited to 'ui/build.gradle.kts')
-rw-r--r-- | ui/build.gradle.kts | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts index 5cdcb6a1..fff3acd9 100644 --- a/ui/build.gradle.kts +++ b/ui/build.gradle.kts @@ -4,11 +4,13 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 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 { @@ -20,11 +22,14 @@ android { } namespace = pkg defaultConfig { - applicationId = pkg + applicationId = appID minSdk = 21 targetSdk = 34 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 { @@ -32,6 +37,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 @@ -48,6 +61,7 @@ android { debug { applicationIdSuffix = ".debug" versionNameSuffix = "-debug" + signingConfig = signingConfigs.getByName("debug") } create("googleplay") { initWith(getByName("release")) |