Added beta flag

pull/147/head
M66B 6 years ago
parent 7bc593903a
commit 71f51f757d

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

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

@ -4,7 +4,10 @@ public class Log {
static final String TAG = "fairemail"; static final String TAG = "fairemail";
public static int i(String msg) { 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) { public static int w(String msg) {

Loading…
Cancel
Save