import java.util.Properties plugins { id("com.android.application") id("org.jetbrains.kotlin.android") id("org.jetbrains.kotlin.plugin.compose") id("com.google.devtools.ksp") id("io.github.takahirom.roborazzi") } android { namespace = "app.telefon" compileSdk = 36 defaultConfig { applicationId = "app.telefon" minSdk = 29 targetSdk = 36 versionCode = 2 versionName = "0.1.1" } // Release key lives outside the repo; without it, release builds fall back to the debug key (local only). val keyProps = Properties().apply { val f = file(System.getProperty("user.home") + "/.android/nogoogleapps-release.properties") if (f.exists()) f.inputStream().use { load(it) } } signingConfigs { if (keyProps.isNotEmpty()) create("release") { storeFile = file(keyProps.getProperty("storeFile")) storePassword = keyProps.getProperty("storePassword") keyAlias = keyProps.getProperty("keyAlias") keyPassword = keyProps.getProperty("keyPassword") } } buildTypes { debug { // installs next to the release app from Obtainium applicationIdSuffix = ".debug" resValue("string", "app_name", "Telefon (Debug)") } release { resValue("string", "app_name", "Telefon") isMinifyEnabled = true isShrinkResources = true signingConfig = signingConfigs.findByName("release") ?: signingConfigs.getByName("debug") proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") } } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } buildFeatures { compose = true } testOptions { unitTests { isIncludeAndroidResources = true } } } kotlin { compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } ksp { arg("room.schemaLocation", "$projectDir/schemas") } dependencies { val composeBom = platform("androidx.compose:compose-bom:2025.10.01") implementation(composeBom) implementation("androidx.compose.ui:ui") implementation("androidx.compose.ui:ui-tooling-preview") implementation("androidx.compose.foundation:foundation") implementation("androidx.compose.material3:material3") implementation("androidx.compose.material:material-icons-extended") debugImplementation("androidx.compose.ui:ui-tooling") implementation("androidx.activity:activity-compose:1.11.0") implementation("androidx.core:core-ktx:1.17.0") implementation("androidx.lifecycle:lifecycle-runtime-compose:2.9.4") implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.9.4") implementation("androidx.room:room-runtime:2.7.0") implementation("androidx.room:room-ktx:2.7.0") ksp("androidx.room:room-compiler:2.7.0") implementation("androidx.datastore:datastore-preferences:1.1.7") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2") testImplementation("junit:junit:4.13.2") testImplementation("org.robolectric:robolectric:4.15.1") testImplementation("androidx.compose.ui:ui-test-junit4") debugImplementation("androidx.compose.ui:ui-test-manifest") testImplementation("io.github.takahirom.roborazzi:roborazzi:1.46.1") testImplementation("io.github.takahirom.roborazzi:roborazzi-compose:1.46.1") } roborazzi { outputDir.set(rootProject.file("../replica/telefon/clone-screens")) }