Add app
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
|
||||
val tmdbProps = Properties().apply {
|
||||
val f = rootProject.file("tmdb.properties")
|
||||
if (f.exists()) f.inputStream().use { load(it) }
|
||||
}
|
||||
|
||||
val keyProps = Properties().apply {
|
||||
val f = rootProject.file("keystore.properties")
|
||||
if (f.exists()) f.inputStream().use { load(it) }
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "space.bloggin.whosthat"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "space.bloggin.whosthat"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 2
|
||||
versionName = "1.1"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
if (keyProps.isNotEmpty()) {
|
||||
create("release") {
|
||||
storeFile = rootProject.file(keyProps["storeFile"] as String)
|
||||
storePassword = keyProps["storePassword"] as String
|
||||
keyAlias = keyProps["keyAlias"] as String
|
||||
keyPassword = keyProps["keyPassword"] as String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
if (keyProps.isNotEmpty()) signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions { jvmTarget = "17" }
|
||||
buildFeatures { compose = true; buildConfig = true }
|
||||
|
||||
flavorDimensions += "edition"
|
||||
productFlavors {
|
||||
create("public") {
|
||||
dimension = "edition"
|
||||
buildConfigField("String", "BUILTIN_TOKEN", "\"\"")
|
||||
}
|
||||
create("family") {
|
||||
dimension = "edition"
|
||||
applicationIdSuffix = ".family"
|
||||
buildConfigField("String", "BUILTIN_TOKEN", "\"${tmdbProps.getProperty("token", "")}\"")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val bom = platform("androidx.compose:compose-bom:2024.12.01")
|
||||
implementation(bom)
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.foundation:foundation")
|
||||
implementation("androidx.compose.material3:material3")
|
||||
implementation("androidx.compose.material:material-icons-core")
|
||||
implementation("androidx.activity:activity-compose:1.9.3")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
||||
implementation("io.coil-kt:coil-compose:2.7.0")
|
||||
}
|
||||
Reference in New Issue
Block a user