2023-01-20 04:47:56 +00:00
|
|
|
import java.io.FileInputStream
|
|
|
|
import java.io.FileNotFoundException
|
|
|
|
import java.util.Properties
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("com.android.application")
|
|
|
|
id("kotlin-android")
|
|
|
|
id("kotlin-kapt")
|
|
|
|
id("dagger.hilt.android.plugin")
|
|
|
|
}
|
|
|
|
|
|
|
|
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 {
|
2024-03-15 03:28:27 +00:00
|
|
|
namespace = "com.wbrawner.twigs.android"
|
2023-01-20 04:47:56 +00:00
|
|
|
compileSdk = libs.versions.maxSdk.get().toInt()
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "com.wbrawner.twigs"
|
|
|
|
minSdk = libs.versions.minSdk.get().toInt()
|
|
|
|
targetSdk = libs.versions.maxSdk.get().toInt()
|
|
|
|
versionCode = libs.versions.versionCode.get().toInt()
|
|
|
|
versionName = libs.versions.versionName.get()
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
signingConfig = signingConfigs["debug"]
|
|
|
|
}
|
|
|
|
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-03-15 03:28:27 +00:00
|
|
|
sourceCompatibility = project.ext["jvm"] as JavaVersion
|
|
|
|
targetCompatibility = project.ext["jvm"] as JavaVersion
|
2023-01-20 04:47:56 +00:00
|
|
|
}
|
|
|
|
kotlinOptions {
|
2024-03-15 03:28:27 +00:00
|
|
|
jvmTarget = (project.ext["jvm"] as JavaVersion).majorVersion
|
2023-01-20 04:47:56 +00:00
|
|
|
}
|
|
|
|
buildFeatures {
|
|
|
|
compose = true
|
|
|
|
}
|
|
|
|
composeOptions {
|
|
|
|
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(project(":shared"))
|
|
|
|
implementation(libs.bundles.coroutines)
|
|
|
|
implementation(libs.bundles.compose)
|
|
|
|
implementation(libs.hilt.android.core)
|
|
|
|
implementation(libs.hilt.navigation.compose)
|
|
|
|
kapt(libs.hilt.android.kapt)
|
|
|
|
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(libs.preference)
|
|
|
|
testImplementation(libs.junit)
|
|
|
|
androidTestImplementation(libs.androidx.test.runner)
|
|
|
|
androidTestUtil(libs.androidx.test.orchestrator)
|
|
|
|
androidTestImplementation(libs.test.ext)
|
|
|
|
androidTestImplementation(libs.espresso)
|
|
|
|
androidTestImplementation(libs.hilt.android.testing)
|
|
|
|
kaptAndroidTest(libs.hilt.android.kapt)
|
|
|
|
androidTestImplementation(libs.compose.test.junit)
|
|
|
|
debugImplementation(libs.compose.test.manifest)
|
|
|
|
}
|