aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2020-11-08 20:03:17 +0100
committerlookshe <github@lookshe.org>2020-11-08 20:03:17 +0100
commit964d02d0e12b109001fc06c056410d9c418f4656 (patch)
tree489d71c998a48244961fe9f223945872c0ebdb1b
parent5475a649468019910543e26bab5bf17313bd6b6c (diff)
add flavor and build config for fixed domains
-rw-r--r--build.gradle10
-rw-r--r--src/main/java/de/pixart/messenger/Config.java4
2 files changed, 11 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index ae5499dc4..fca4819d4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -130,7 +130,7 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
- flavorDimensions("distribution", "stage")
+ flavorDimensions("distribution", "domain", "stage")
productFlavors {
beta {
@@ -139,6 +139,14 @@ android {
versionNameSuffix "-beta"
resValue "string", "applicationId", appId + applicationIdSuffix
}
+ allDomain {
+ dimension "domain"
+ buildConfigField 'String', 'FIXED_DOMAIN', 'null'
+ }
+ huaraka {
+ dimension "domain"
+ buildConfigField 'String', 'FIXED_DOMAIN', '"jabber.huaraka.de"'
+ }
piratx {
dimension "distribution"
}
diff --git a/src/main/java/de/pixart/messenger/Config.java b/src/main/java/de/pixart/messenger/Config.java
index a9fef89c7..5c4dd4218 100644
--- a/src/main/java/de/pixart/messenger/Config.java
+++ b/src/main/java/de/pixart/messenger/Config.java
@@ -53,8 +53,8 @@ public final class Config {
public static final String XMPP_IP = null; //BuildConfig.XMPP_IP; // set to null means disable
public static final Integer[] XMPP_Ports = null; //BuildConfig.XMPP_Ports; // set to null means disable
- public static final String DOMAIN_LOCK = null; //BuildConfig.DOMAIN_LOCK; //only allow account creation for this domain
- public static final String MAGIC_CREATE_DOMAIN = null; //"blabber.im";
+ public static final String DOMAIN_LOCK = BuildConfig.FIXED_DOMAIN;
+ public static final String MAGIC_CREATE_DOMAIN = BuildConfig.FIXED_DOMAIN;
public static final String CHANNEL_DISCOVERY = "https://search.jabbercat.org";
public static final boolean DISALLOW_REGISTRATION_IN_UI = false; //hide the register checkbox