mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Make the PUSHER_APP_ID configurable at build time.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import config.BuildTimeConfig
|
||||
import extension.buildConfigFieldStr
|
||||
import extension.setupDependencyInjection
|
||||
import extension.testCommonDependencies
|
||||
|
||||
@@ -17,6 +19,33 @@ plugins {
|
||||
android {
|
||||
namespace = "io.element.android.libraries.push.impl"
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
val defaultPusherAppId = "im.vector.app.android"
|
||||
getByName("release") {
|
||||
buildConfigFieldStr(
|
||||
name = "PUSHER_APP_ID",
|
||||
value = BuildTimeConfig.PUSHER_APP_ID_RELEASE ?: defaultPusherAppId,
|
||||
)
|
||||
}
|
||||
getByName("debug") {
|
||||
buildConfigFieldStr(
|
||||
name = "PUSHER_APP_ID",
|
||||
value = BuildTimeConfig.PUSHER_APP_ID_DEBUG ?: defaultPusherAppId,
|
||||
)
|
||||
}
|
||||
register("nightly") {
|
||||
matchingFallbacks += listOf("release")
|
||||
buildConfigFieldStr(
|
||||
name = "PUSHER_APP_ID",
|
||||
value = BuildTimeConfig.PUSHER_APP_ID_NIGHTLY ?: defaultPusherAppId,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests {
|
||||
isIncludeAndroidResources = true
|
||||
|
||||
Reference in New Issue
Block a user