diff options
Diffstat (limited to 'ui/build.gradle.kts')
-rw-r--r-- | ui/build.gradle.kts | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts index 58a6a687..25122e59 100644 --- a/ui/build.gradle.kts +++ b/ui/build.gradle.kts @@ -1,7 +1,11 @@ @file:Suppress("UnstableApiUsage") + import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +// Grotesque workaround for https://issuetracker.google.com/issues/279780940 +System.setProperty("com.android.tools.r8.disableApiModeling", "1") + val pkg: String = providers.gradleProperty("wireguardPackageName").get() val appID: String = providers.gradleProperty("wireguardApplicationID").get() @@ -9,6 +13,7 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.kapt) + alias(libs.plugins.ajoberstar.grgit) } android { @@ -24,9 +29,11 @@ android { 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()) - buildConfigField("boolean", "IS_GOOGLE_PLAY", false.toString()) } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 @@ -50,6 +57,7 @@ android { resources { excludes += "DebugProbesKt.bin" excludes += "kotlin-tooling-metadata.json" + excludes += "META-INF/*.version" } } } @@ -60,9 +68,12 @@ android { } create("googleplay") { initWith(getByName("release")) - buildConfigField("boolean", "IS_GOOGLE_PLAY", true.toString()) + matchingFallbacks += "release" } } + androidResources { + generateLocaleConfig = true + } lint { disable += "LongLogTag" warning += "MissingTranslation" |