ci: align MindMachine Android workflow with e-Sun setup
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
@@ -5,7 +7,17 @@ plugins {
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
|
||||
import java.util.Properties
|
||||
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
val keystoreProperties = Properties()
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystorePropertiesFile.inputStream().use { keystoreProperties.load(it) }
|
||||
}
|
||||
val hasReleaseSigning = listOf(
|
||||
"storeFile",
|
||||
"storePassword",
|
||||
"keyAlias",
|
||||
"keyPassword",
|
||||
).all { !keystoreProperties.getProperty(it).isNullOrBlank() }
|
||||
|
||||
android {
|
||||
namespace = "solutions.tretter.mindmachine"
|
||||
@@ -21,25 +33,25 @@ android {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
signingConfigs {
|
||||
signingConfigs {
|
||||
if (hasReleaseSigning) {
|
||||
create("release") {
|
||||
val propsFile = rootProject.file("keystore/upload-keystore.properties")
|
||||
if (propsFile.exists()) {
|
||||
val props = Properties().apply { propsFile.inputStream().use { this.load(it) } }
|
||||
storeFile = rootProject.file(props.getProperty("storeFile"))
|
||||
storePassword = props.getProperty("storePassword")
|
||||
keyAlias = props.getProperty("keyAlias")
|
||||
keyPassword = props.getProperty("keyPassword")
|
||||
}
|
||||
storeFile = file(keystoreProperties.getProperty("storeFile"))
|
||||
storePassword = keystoreProperties.getProperty("storePassword")
|
||||
keyAlias = keystoreProperties.getProperty("keyAlias")
|
||||
keyPassword = keystoreProperties.getProperty("keyPassword")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
buildConfigField("boolean", "DEBUG_AD_FREE", "true")
|
||||
}
|
||||
release {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
if (hasReleaseSigning) {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
@@ -88,7 +100,6 @@ dependencies {
|
||||
implementation("androidx.compose.material:material-icons-extended")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1")
|
||||
|
||||
// Monetization
|
||||
implementation("com.google.android.gms:play-services-ads:23.1.0")
|
||||
implementation("com.android.billingclient:billing-ktx:8.0.0")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user