diff --git a/.gitignore b/.gitignore index 9b08832..ffec2f6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ build/ .kotlin/ captures/ *.apk -*.aab \ No newline at end of file +*.aab +keystore.properties +*.jks \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 03df060..e121925 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,8 +1,15 @@ +import java.util.Properties + plugins { id("com.android.application") id("org.jetbrains.kotlin.android") } +val keystoreProps = Properties().apply { + val f = rootProject.file("keystore.properties") + if (f.exists()) f.inputStream().use { load(it) } +} + android { namespace = "ru.ua1zbe.aprsmap" compileSdk = 34 @@ -12,12 +19,24 @@ android { minSdk = 26 targetSdk = 34 versionCode = 1 - versionName = "1.0" + versionName = "1.0.0" + } + + signingConfigs { + if (keystoreProps["KPASS"] != null) { + create("release") { + storeFile = rootProject.file("aprsmap-release.jks") + storePassword = keystoreProps["KPASS"] as String + keyAlias = "aprsmap" + keyPassword = keystoreProps["KPASS"] as String + } + } } buildTypes { release { isMinifyEnabled = false + signingConfig = signingConfigs.findByName("release") } }