Added beta flag

This commit is contained in:
M66B 2018-12-28 09:56:40 +00:00
parent 7bc593903a
commit 71f51f757d
3 changed files with 9 additions and 2 deletions

View File

@ -23,6 +23,7 @@ android {
minifyEnabled = true
useProguard = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\""
}
@ -31,6 +32,7 @@ android {
minifyEnabled = true
useProguard = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "GITHUB_LATEST_API", "\"\""
}
@ -39,6 +41,7 @@ android {
minifyEnabled = false
useProguard = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\""
}

View File

@ -48,7 +48,8 @@ public class ApplicationEx extends Application {
if (ownFault(ex)) {
Log.e(ex);
if (!Helper.isPlayStoreInstall(ApplicationEx.this))
if (BuildConfig.BETA_RELEASE ||
!Helper.isPlayStoreInstall(ApplicationEx.this))
writeCrashLog(ApplicationEx.this, ex);
if (prev != null)

View File

@ -4,7 +4,10 @@ public class Log {
static final String TAG = "fairemail";
public static int i(String msg) {
return android.util.Log.i(TAG, msg);
if (BuildConfig.BETA_RELEASE)
return android.util.Log.i(TAG, msg);
else
return 0;
}
public static int w(String msg) {