99 lines
3.1 KiB
Kotlin
99 lines
3.1 KiB
Kotlin
import java.util.Properties
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.hilt)
|
|
alias(libs.plugins.navigation.safeargs)
|
|
}
|
|
|
|
val localProperties = Properties().apply {
|
|
val file = rootProject.file("local.properties")
|
|
if (file.exists()) {
|
|
file.inputStream().use { load(it) }
|
|
}
|
|
}
|
|
|
|
fun quoted(value: String): String = "\"$value\""
|
|
|
|
val emulatorBackendUrl =
|
|
(localProperties.getProperty("petstore.backend.emulatorUrl") ?: "http://10.0.2.2:8080/").trim()
|
|
val deviceBackendUrl =
|
|
(localProperties.getProperty("petstore.backend.deviceUrl") ?: "http://10.0.0.200:8080/").trim()
|
|
|
|
android {
|
|
namespace = "com.example.petstoremobile"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "com.example.petstoremobile"
|
|
minSdk = 24
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
buildConfigField("String", "EMULATOR_BACKEND_URL", quoted(emulatorBackendUrl))
|
|
buildConfigField("String", "DEVICE_BACKEND_URL", quoted(deviceBackendUrl))
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.appcompat)
|
|
implementation(libs.material)
|
|
implementation(libs.activity)
|
|
implementation(libs.constraintlayout)
|
|
|
|
implementation(libs.hilt.android)
|
|
annotationProcessor(libs.hilt.compiler)
|
|
|
|
implementation(libs.navigation.fragment)
|
|
implementation(libs.navigation.ui)
|
|
|
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
|
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
|
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
|
|
|
implementation("com.google.android.material:material:1.11.0")
|
|
implementation("androidx.viewpager2:viewpager2:1.1.0")
|
|
|
|
implementation("androidx.camera:camera-core:1.4.0")
|
|
implementation("androidx.camera:camera-camera2:1.4.0")
|
|
implementation("androidx.camera:camera-lifecycle:1.4.0")
|
|
implementation("androidx.camera:camera-view:1.4.0")
|
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
|
implementation(libs.swiperefreshlayout)
|
|
|
|
implementation("com.github.NaikSoftware:StompProtocolAndroid:1.6.6")
|
|
implementation("io.reactivex.rxjava2:rxjava:2.2.21")
|
|
implementation("io.reactivex.rxjava2:rxandroid:2.1.1")
|
|
|
|
implementation("com.github.bumptech.glide:glide:4.16.0")
|
|
annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")
|
|
|
|
implementation("com.github.prolificinteractive:material-calendarview:2.0.1")
|
|
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.ext.junit)
|
|
androidTestImplementation(libs.espresso.core)
|
|
}
|