android/app/build.gradle.kts (1826 bytes)
1 import java.util.Properties 2 3 plugins { 4 id("com.android.application") 5 id("org.jetbrains.kotlin.android") 6 } 7 8 /** 9 * Release signing is optional. The keys come from keystore.properties in the root of the project, 10 * which is not in the repository. Without that file the release build still makes an unsigned APK, 11 * so a fresh clone always builds. 12 */ 13 val keystoreProps = Properties().apply { 14 val file = rootProject.file("keystore.properties") 15 if (file.exists()) file.inputStream().use { load(it) } 16 } 17 val hasSigning = keystoreProps.getProperty("storeFile") != null 18 19 android { 20 namespace = "dev.equwal.ideamine" 21 compileSdk = 36 22 23 defaultConfig { 24 applicationId = "dev.equwal.ideamine" 25 minSdk = 31 26 targetSdk = 36 27 versionCode = 1 28 versionName = "0.1.0" 29 } 30 31 signingConfigs { 32 if (hasSigning) { 33 create("release") { 34 storeFile = rootProject.file(keystoreProps.getProperty("storeFile")) 35 storePassword = keystoreProps.getProperty("storePassword") 36 keyAlias = keystoreProps.getProperty("keyAlias") 37 keyPassword = keystoreProps.getProperty("keyPassword") 38 } 39 } 40 } 41 42 buildTypes { 43 release { 44 // No shrinking: the app is a window on the dashboard, and R8 adds nothing here. 45 isMinifyEnabled = false 46 if (hasSigning) signingConfig = signingConfigs.getByName("release") 47 } 48 } 49 50 compileOptions { 51 sourceCompatibility = JavaVersion.VERSION_17 52 targetCompatibility = JavaVersion.VERSION_17 53 } 54 55 kotlin { 56 compilerOptions { 57 jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) 58 } 59 } 60 } 61 62 dependencies { 63 implementation("androidx.activity:activity:1.11.0") 64 }