Skip to content

Commit

Permalink
[ref] Build Vars
Browse files Browse the repository at this point in the history
  • Loading branch information
rustamsafarovrs committed Jun 25, 2024
1 parent 8fb794f commit 56453c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
3 changes: 3 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ android {
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
buildConfigField("String", "BASE_URL", "\"https://rsdevteam.ru/inmuslim/api/\"")
}
debug {
isDebuggable = true
applicationIdSuffix = ".beta"
signingConfig = signingConfigs.getByName("debug")
buildConfigField("String", "BASE_URL", "\"https://rsdevteam.ru/inmuslim/api/\"")
}
}
compileOptions {
Expand All @@ -72,6 +74,7 @@ android {
}
buildFeatures {
compose = true
buildConfig = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
Expand Down
14 changes: 4 additions & 10 deletions app/src/main/java/tj/rsdevteam/inmuslim/config/BuildVars.kt
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
package tj.rsdevteam.inmuslim.config

import tj.rsdevteam.inmuslim.BuildConfig

/**
* Created by Rustam Safarov on 8/13/23.
* github.com/rustamsafarovrs
*/

object BuildVars {

val BUILD_TYPE = BuildType.PROD

val BASE_URL: String = when (BUILD_TYPE) {
BuildType.TEST -> {
"http://rsdevteam.ru:8088/inmuslim/staging/api/"
}
BuildType.PROD -> {
"https://rsdevteam.ru/inmuslim/api/"
}
}
val BUILD_TYPE = if (BuildConfig.DEBUG) BuildType.TEST else BuildType.PROD
const val BASE_URL = BuildConfig.BASE_URL
}

enum class BuildType {
Expand Down

0 comments on commit 56453c2

Please sign in to comment.