pihelper-android/app/build.gradle.kts

101 lines
3.5 KiB
Text
Raw Normal View History

2021-06-04 00:34:44 +00:00
import java.io.FileInputStream
import java.io.FileNotFoundException
2022-06-25 18:42:38 +00:00
import java.util.*
2021-06-04 00:34:44 +00:00
plugins {
2024-11-16 23:40:25 +00:00
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.ksp)
alias(libs.plugins.hilt.android)
alias(libs.plugins.compose)
2021-06-04 00:34:44 +00:00
}
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()
2021-06-04 00:34:44 +00:00
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"
2022-12-23 05:12:20 +00:00
testInstrumentationRunnerArguments["clearPackageData"] = "true"
2021-06-04 00:34:44 +00:00
signingConfig = signingConfigs["debug"]
}
2022-12-23 05:12:20 +00:00
testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
2021-06-04 00:34:44 +00:00
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 {
2024-11-16 23:40:25 +00:00
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
2021-06-04 00:34:44 +00:00
}
kotlinOptions {
2024-11-16 23:40:25 +00:00
jvmTarget = "21"
2021-06-04 00:34:44 +00:00
}
buildFeatures {
2021-06-11 03:20:31 +00:00
compose = true
2021-06-04 00:34:44 +00:00
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}
2024-11-16 22:23:43 +00:00
namespace = "com.wbrawner.pihelper"
2021-06-04 00:34:44 +00:00
}
dependencies {
implementation(project(":shared"))
implementation(libs.bundles.coroutines)
2021-06-11 03:20:31 +00:00
implementation(libs.bundles.compose)
2021-06-04 01:47:06 +00:00
implementation(libs.hilt.android.core)
2021-06-11 03:20:31 +00:00
implementation(libs.hilt.navigation.compose)
2024-11-16 23:40:25 +00:00
ksp(libs.hilt.android.ksp)
implementation(libs.androidx.core)
implementation(libs.androidx.appcompat)
2022-06-25 18:42:38 +00:00
implementation(libs.androidx.splash)
implementation(libs.material)
2021-06-04 00:34:44 +00:00
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.security:security-crypto:1.0.0")
implementation(libs.preference)
testImplementation(libs.junit)
2022-12-23 05:12:20 +00:00
androidTestImplementation(libs.mockwebserver)
androidTestImplementation(libs.androidx.test.runner)
androidTestUtil(libs.androidx.test.orchestrator)
androidTestImplementation(libs.test.ext)
androidTestImplementation(libs.espresso)
2022-12-23 05:12:20 +00:00
androidTestImplementation(libs.hilt.android.testing)
2024-11-16 23:40:25 +00:00
kspAndroidTest(libs.hilt.android.ksp)
2022-12-23 05:12:20 +00:00
androidTestImplementation(libs.compose.test.junit)
debugImplementation(libs.compose.test.manifest)
2021-06-04 00:34:44 +00:00
}