import java.io.FileInputStream import java.io.FileNotFoundException import java.util.* plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.ksp) alias(libs.plugins.hilt.android) alias(libs.plugins.compose) } val keystoreProperties = Properties() try { val keystorePropertiesFile = rootProject.file("keystore.properties") keystoreProperties.load(FileInputStream(keystorePropertiesFile)) } catch (ignored: FileNotFoundException) { logger.warn("Unable to load keystore properties. Using debug signing configuration instead") keystoreProperties["keyAlias"] = "androiddebugkey" keystoreProperties["keyPassword"] = "android" keystoreProperties["storeFile"] = File(System.getProperty("user.home"), ".android/debug.keystore").absolutePath keystoreProperties["storePassword"] = "android" } android { compileSdk = libs.versions.maxSdk.get().toInt() defaultConfig { applicationId = "com.wbrawner.pihelper" minSdk = libs.versions.minSdk.get().toInt() targetSdk = libs.versions.maxSdk.get().toInt() versionCode = libs.versions.versionCode.get().toInt() versionName = libs.versions.versionName.get() testInstrumentationRunner = "com.wbrawner.pihelper.util.HiltTestRunner" testInstrumentationRunnerArguments["clearPackageData"] = "true" signingConfig = signingConfigs["debug"] } testOptions { execution = "ANDROIDX_TEST_ORCHESTRATOR" } signingConfigs { create("release") { keyAlias = keystoreProperties["keyAlias"].toString() keyPassword = keystoreProperties["keyPassword"].toString() storeFile = file(keystoreProperties["storeFile"].toString()) storePassword = keystoreProperties["storePassword"].toString() } } buildTypes { release { isMinifyEnabled = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) signingConfig = signingConfigs["release"] } } compileOptions { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } kotlinOptions { jvmTarget = "21" } buildFeatures { compose = true } composeOptions { kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() } namespace = "com.wbrawner.pihelper" } dependencies { implementation(project(":shared")) implementation(libs.bundles.coroutines) implementation(libs.bundles.compose) implementation(libs.hilt.android.core) implementation(libs.hilt.navigation.compose) ksp(libs.hilt.android.ksp) implementation(libs.androidx.core) implementation(libs.androidx.appcompat) implementation(libs.androidx.splash) implementation(libs.material) implementation("androidx.legacy:legacy-support-v4:1.0.0") implementation("androidx.security:security-crypto:1.0.0") implementation(libs.preference) testImplementation(libs.junit) androidTestImplementation(libs.mockwebserver) androidTestImplementation(libs.androidx.test.runner) androidTestUtil(libs.androidx.test.orchestrator) androidTestImplementation(libs.test.ext) androidTestImplementation(libs.espresso) androidTestImplementation(libs.hilt.android.testing) kspAndroidTest(libs.hilt.android.ksp) androidTestImplementation(libs.compose.test.junit) debugImplementation(libs.compose.test.manifest) }