Skip to content

Commit

Permalink
Line reorder in build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
HLCaptain committed Jul 31, 2024
1 parent 76dcd1f commit 0594a75
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,6 @@ android {
}
}

buildTypes {
val mapboxAccessToken = properties["MAPBOX_ACCESS_TOKEN"].toString()
val mapboxDownloadsToken = properties["MAPBOX_DOWNLOADS_TOKEN"].toString()
val mapboxSdkRegistryToken = properties["SDK_REGISTRY_TOKEN"].toString()
getByName("debug") {
isDebuggable = true
buildConfigField("String", "MapboxAccessToken", "\"$mapboxAccessToken\"")
buildConfigField("String", "MapboxDownloadsToken", "\"$mapboxDownloadsToken\"")
buildConfigField("String", "MapboxSdkRegistryToken", "\"$mapboxSdkRegistryToken\"")
}
getByName("release") {
initWith(getByName("debug"))
isDebuggable = false
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

signingConfigs {
val properties = loadPropertiesFile("../local.properties").toMap()

Expand All @@ -117,6 +95,29 @@ android {
}
}

buildTypes {
val mapboxAccessToken = properties["MAPBOX_ACCESS_TOKEN"].toString()
val mapboxDownloadsToken = properties["MAPBOX_DOWNLOADS_TOKEN"].toString()
val mapboxSdkRegistryToken = properties["SDK_REGISTRY_TOKEN"].toString()
getByName("debug") {
isDebuggable = true
buildConfigField("String", "MapboxAccessToken", "\"$mapboxAccessToken\"")
buildConfigField("String", "MapboxDownloadsToken", "\"$mapboxDownloadsToken\"")
buildConfigField("String", "MapboxSdkRegistryToken", "\"$mapboxSdkRegistryToken\"")
}
getByName("release") {
isDebuggable = false
isMinifyEnabled = true
isShrinkResources = true
buildConfigField("String", "MapboxAccessToken", "\"$mapboxAccessToken\"")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down

0 comments on commit 0594a75

Please sign in to comment.