79 lines
2.5 KiB
Kotlin
79 lines
2.5 KiB
Kotlin
import java.util.Properties
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
}
|
|
|
|
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
val keystoreProperties = Properties().apply {
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystorePropertiesFile.inputStream().use(::load)
|
|
}
|
|
}
|
|
val hasReleaseSigning = listOf("storeFile", "storePassword", "keyAlias", "keyPassword")
|
|
.all { keystoreProperties.getProperty(it).isNullOrBlank().not() }
|
|
|
|
android {
|
|
namespace = "com.example.instanoreels"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "com.example.instanoreels"
|
|
minSdk = 26
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
buildConfigField("String", "INSTAGRAM_PACKAGE", "\"com.instagram.android\"")
|
|
}
|
|
|
|
signingConfigs {
|
|
if (hasReleaseSigning) {
|
|
create("release") {
|
|
storeFile = rootProject.file(keystoreProperties.getProperty("storeFile"))
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
if (hasReleaseSigning) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.core:core-ktx:1.13.1")
|
|
implementation("androidx.activity:activity-compose:1.10.1")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.2")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.2")
|
|
implementation("androidx.compose.ui:ui-android:1.8.3")
|
|
implementation("androidx.compose.ui:ui-tooling-preview-android:1.8.3")
|
|
implementation("androidx.compose.material3:material3-android:1.3.1")
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
|
implementation("androidx.datastore:datastore-preferences:1.1.1")
|
|
|
|
debugImplementation("androidx.compose.ui:ui-tooling-android:1.8.3")
|
|
}
|