flavor alpha,beta

This commit is contained in:
m2049r 2018-09-26 18:55:33 +02:00 committed by m2049r
parent 3e90f2e22e
commit 5101b7da5e
2 changed files with 26 additions and 3 deletions

View File

@ -18,6 +18,20 @@ android {
}
}
flavorDimensions "version"
productFlavors {
alpha {
applicationIdSuffix ".alpha"
versionNameSuffix " (alpha)"
}
beta {
applicationIdSuffix ".beta"
versionNameSuffix " (beta)"
}
prod {
}
}
buildTypes {
release {
minifyEnabled false
@ -27,6 +41,7 @@ android {
applicationIdSuffix ".debug"
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
@ -62,9 +77,13 @@ android {
output ->
def abiName = output.getFilter(com.android.build.OutputFile.ABI)
output.versionCodeOverride = abiCodes.get(abiName, 0) + 10 * variant.versionCode
//def flavor = output.getFilter(flavor)
if (abiName == null) abiName = "universal"
def v = "${variant.versionName}".replaceFirst(" .*\$", "").replace(".", "x")
def v = "${variant.versionName}".replaceFirst(" '.*' ?", "")
.replace(".", "x")
.replace("(", "-")
.replace(")", "")
outputFileName = "$rootProject.ext.apkName-" + v + "_" + abiName + ".apk"
}
}

View File

@ -76,10 +76,14 @@ import okhttp3.HttpUrl;
import timber.log.Timber;
public class Helper {
static private final String FLAVOR_SUFFIX =
(BuildConfig.FLAVOR.equals("prod") ? "" : "." + BuildConfig.FLAVOR)
+ (BuildConfig.DEBUG ? "-debug" : "");
static public final String CRYPTO = "XMR";
static private final String WALLET_DIR = "monerujo" + (BuildConfig.DEBUG ? "-debug" : "");
static private final String HOME_DIR = "monero" + (BuildConfig.DEBUG ? "-debug" : "");
static private final String WALLET_DIR = "monerujo" + FLAVOR_SUFFIX;
static private final String HOME_DIR = "monero" + FLAVOR_SUFFIX;
static public int DISPLAY_DIGITS_INFO = 5;