File tree Expand file tree Collapse file tree 3 files changed +23
-25
lines changed
libraries/pushproviders/firebase
plugins/src/main/kotlin/config Expand file tree Collapse file tree 3 files changed +23
-25
lines changed Original file line number Diff line number Diff line change 1010import com.android.build.api.variant.FilterConfiguration.FilterType.ABI
1111import com.android.build.gradle.internal.tasks.factory.dependsOn
1212import com.android.build.gradle.tasks.GenerateBuildConfig
13+ import config.BuildTimeConfig
1314import extension.AssetCopyTask
1415import extension.ComponentMergingStrategy
1516import extension.GitBranchNameValueSource
@@ -43,11 +44,7 @@ android {
4344 namespace = " io.element.android.x"
4445
4546 defaultConfig {
46- applicationId = if (isEnterpriseBuild) {
47- " io.element.enterprise"
48- } else {
49- " io.element.android.x"
50- }
47+ applicationId = BuildTimeConfig .APPLICATION_ID
5148 targetSdk = Versions .TARGET_SDK
5249 versionCode = Versions .VERSION_CODE
5350 versionName = Versions .VERSION_NAME
@@ -97,11 +94,7 @@ android {
9794 }
9895 }
9996
100- val baseAppName = if (isEnterpriseBuild) {
101- " Element Enterprise"
102- } else {
103- " Element X"
104- }
97+ val baseAppName = BuildTimeConfig .APPLICATION_NAME
10598 logger.warnInBox(" Building $baseAppName " )
10699
107100 buildTypes {
Original file line number Diff line number Diff line change 77
88@file:Suppress(" UnstableApiUsage" )
99
10+ import config.BuildTimeConfig
1011import extension.setupAnvil
1112
1213plugins {
@@ -22,22 +23,14 @@ android {
2223 resValue(
2324 type = " string" ,
2425 name = " google_app_id" ,
25- value = if (isEnterpriseBuild) {
26- " 1:912726360885:android:d273c2077ec3291500427c"
27- } else {
28- " 1:912726360885:android:d097de99a4c23d2700427c"
29- }
26+ value = BuildTimeConfig .GOOGLE_APP_ID_RELEASE ,
3027 )
3128 }
3229 getByName(" debug" ) {
3330 resValue(
3431 type = " string" ,
3532 name = " google_app_id" ,
36- value = if (isEnterpriseBuild) {
37- " 1:912726360885:android:f8de9126a94143d300427c"
38- } else {
39- " 1:912726360885:android:def0a4e454042e9b00427c"
40- }
33+ value = BuildTimeConfig .GOOGLE_APP_ID_DEBUG ,
4134 )
4235 }
4336 register(" nightly" ) {
@@ -46,11 +39,7 @@ android {
4639 resValue(
4740 type = " string" ,
4841 name = " google_app_id" ,
49- value = if (isEnterpriseBuild) {
50- " 1:912726360885:android:3f7e1fe644d99d5a00427c"
51- } else {
52- " 1:912726360885:android:e17435e0beb0303000427c"
53- }
42+ value = BuildTimeConfig .GOOGLE_APP_ID_NIGHTLY ,
5443 )
5544 }
5645 }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2025 New Vector Ltd.
3+ *
4+ * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
5+ * Please see LICENSE files in the repository root for full details.
6+ */
7+
8+ package config
9+
10+ object BuildTimeConfig {
11+ const val APPLICATION_ID = " io.element.android.x"
12+ const val APPLICATION_NAME = " Element X"
13+ const val GOOGLE_APP_ID_RELEASE = " 1:912726360885:android:d097de99a4c23d2700427c"
14+ const val GOOGLE_APP_ID_DEBUG = " 1:912726360885:android:def0a4e454042e9b00427c"
15+ const val GOOGLE_APP_ID_NIGHTLY = " 1:912726360885:android:e17435e0beb0303000427c"
16+ }
You can’t perform that action at this time.
0 commit comments