mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-12 18:22:22 +00:00
Merge branch 'master' into gracia
# Conflicts: # app/build.gradle.kts # app/src/main/java/com/alya/ecommerce_serang/data/api/retrofit/ApiService.kt # app/src/main/java/com/alya/ecommerce_serang/data/repository/ProductRepository.kt
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import org.gradle.api.tasks.compile.JavaCompile
|
||||
|
||||
import java.util.Properties
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.jetbrains.kotlin.android)
|
||||
@ -9,6 +8,14 @@ plugins {
|
||||
// id("com.google.dagger.hilt.android")
|
||||
}
|
||||
|
||||
val localProperties = Properties().apply {
|
||||
val localPropertiesFile = rootProject.file("local.properties")
|
||||
if (localPropertiesFile.exists()) {
|
||||
load(localPropertiesFile.inputStream())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
android {
|
||||
namespace = "com.alya.ecommerce_serang"
|
||||
compileSdk = 35
|
||||
@ -21,11 +28,19 @@ android {
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
buildConfigField(
|
||||
"String",
|
||||
"BASE_URL",
|
||||
"\"${localProperties["BASE_URL"] ?: "http://default-url.com/"}\""
|
||||
)
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
buildConfigField("String", "BASE_URL", "\"http://192.168.20.238:3000/\"")
|
||||
buildConfigField("String",
|
||||
"BASE_URL",
|
||||
"\"${localProperties["BASE_URL"] ?: "http://default-url.com/"}\"")
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
@ -33,7 +48,9 @@ android {
|
||||
)
|
||||
}
|
||||
debug {
|
||||
buildConfigField("String", "BASE_URL", "\"http://192.168.20.238:3000/\"")
|
||||
buildConfigField("String",
|
||||
"BASE_URL",
|
||||
"\"${localProperties["BASE_URL"] ?: "http://default-url.com/"}\"")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
|
Reference in New Issue
Block a user