mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +05:30
android: add release signing support
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
010983ccba
commit
120f284762
1 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.compose") version "0.4.0"
|
||||
id("com.android.application")
|
||||
|
@ -27,6 +29,21 @@ android {
|
|||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
}
|
||||
val keystoreConfigFile = rootProject.layout.projectDirectory.file("keystore.properties")
|
||||
if (keystoreConfigFile.asFile.exists()) {
|
||||
val contents = providers.fileContents(keystoreConfigFile).asText.forUseAtConfigurationTime()
|
||||
val keystoreProperties = Properties()
|
||||
keystoreProperties.load(contents.get().byteInputStream())
|
||||
signingConfigs {
|
||||
register("release") {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = rootProject.file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
buildTypes.all { signingConfig = signingConfigs.getByName("release") }
|
||||
}
|
||||
buildTypes { getByName("release") { isMinifyEnabled = false } }
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue