diff --git a/Clover/app/build.gradle b/Clover/app/build.gradle
index 2fea3e0f..4dbbd0bd 100644
--- a/Clover/app/build.gradle
+++ b/Clover/app/build.gradle
@@ -44,6 +44,7 @@ android {
buildToolsVersion '28.0.3'
defaultConfig {
+ applicationId "org.floens.chan"
minSdkVersion 15
targetSdkVersion 28
@@ -70,10 +71,10 @@ android {
keyPass=pass
*/
- def hash = getCommitHash();
+ def hash = getCommitHash()
File f = file('keys.properties')
- boolean doSign = f.exists();
+ boolean doSign = f.exists()
if (doSign) {
Properties props = new Properties()
@@ -102,7 +103,6 @@ android {
// the flavor name is appended to the name in the settings.
"default" {
dimension "default"
- applicationId "org.floens.chan"
resValue "string", "app_name", "Clover"
resValue "string", "app_flavor_name", ""
buildConfigField "String", "BUILD_HASH", "\"$hash\""
@@ -112,7 +112,7 @@ android {
dev {
dimension "default"
- applicationId "org.floens.chan.dev"
+ applicationIdSuffix ".dev"
resValue "string", "app_name", "Clover dev"
resValue "string", "app_flavor_name", ""
buildConfigField "String", "BUILD_HASH", "\"$hash\""
@@ -124,7 +124,6 @@ android {
fdroid {
dimension "default"
- applicationId "org.floens.chan"
resValue "string", "app_name", "Clover"
resValue "string", "app_flavor_name", "F-Droid"
buildConfigField "String", "BUILD_HASH", "\"$hash\""
@@ -140,11 +139,13 @@ android {
}
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
+ buildConfigField "boolean", "DEVELOPER_MODE", "false"
}
debug {
// minifyEnabled true
// proguardFiles 'proguard.cfg'
+ buildConfigField "boolean", "DEVELOPER_MODE", "true"
}
}
}
diff --git a/Clover/app/src/debug/java/org/floens/chan/ChanBuild.java b/Clover/app/src/debug/java/org/floens/chan/ChanBuild.java
deleted file mode 100644
index 2029f65f..00000000
--- a/Clover/app/src/debug/java/org/floens/chan/ChanBuild.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Clover - 4chan browser https://github.com/Floens/Clover/
- * Copyright (C) 2014 Floens
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.floens.chan;
-
-// debug version
-public class ChanBuild {
- public static final boolean DEVELOPER_MODE = true;
-}
diff --git a/Clover/app/src/default/AndroidManifest.xml b/Clover/app/src/default/AndroidManifest.xml
deleted file mode 100644
index 0b5bc286..00000000
--- a/Clover/app/src/default/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Clover/app/src/dev/AndroidManifest.xml b/Clover/app/src/dev/AndroidManifest.xml
deleted file mode 100644
index e4f437e2..00000000
--- a/Clover/app/src/dev/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Clover/app/src/fdroid/AndroidManifest.xml b/Clover/app/src/fdroid/AndroidManifest.xml
deleted file mode 100644
index 0b5bc286..00000000
--- a/Clover/app/src/fdroid/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Clover/app/src/main/AndroidManifest.xml b/Clover/app/src/main/AndroidManifest.xml
index 7c8529d7..d3e9e81e 100644
--- a/Clover/app/src/main/AndroidManifest.xml
+++ b/Clover/app/src/main/AndroidManifest.xml
@@ -96,8 +96,17 @@ along with this program. If not, see .
-
-
+
+
+
+
+
diff --git a/Clover/app/src/main/java/org/floens/chan/Chan.java b/Clover/app/src/main/java/org/floens/chan/Chan.java
index 792892fb..98384eff 100644
--- a/Clover/app/src/main/java/org/floens/chan/Chan.java
+++ b/Clover/app/src/main/java/org/floens/chan/Chan.java
@@ -107,7 +107,7 @@ public class Chan extends Application implements UserAgentProvider, Application.
Time.endTiming("Initializing application", startTime);
// Start watching for slow disk reads and writes after the heavy initializing is done
- if (ChanBuild.DEVELOPER_MODE) {
+ if (BuildConfig.DEVELOPER_MODE) {
StrictMode.setThreadPolicy(
new StrictMode.ThreadPolicy.Builder()
.detectCustomSlowCalls()
diff --git a/Clover/app/src/main/java/org/floens/chan/ChanApplication.java b/Clover/app/src/main/java/org/floens/chan/ChanApplication.java
index afe7d48d..257681b9 100644
--- a/Clover/app/src/main/java/org/floens/chan/ChanApplication.java
+++ b/Clover/app/src/main/java/org/floens/chan/ChanApplication.java
@@ -33,7 +33,7 @@ public class ChanApplication extends Chan {
initialize();
- if (!ChanBuild.DEVELOPER_MODE && ChanSettings.isCrashReportingEnabled()) {
+ if (!BuildConfig.DEVELOPER_MODE && ChanSettings.isCrashReportingEnabled()) {
Sentry.init(
BuildConfig.CRASH_REPORT_TOKEN +
"?release=" + BuildConfig.VERSION_NAME +
diff --git a/Clover/app/src/main/java/org/floens/chan/utils/Logger.java b/Clover/app/src/main/java/org/floens/chan/utils/Logger.java
index 04991109..bd8273a9 100644
--- a/Clover/app/src/main/java/org/floens/chan/utils/Logger.java
+++ b/Clover/app/src/main/java/org/floens/chan/utils/Logger.java
@@ -19,14 +19,14 @@ package org.floens.chan.utils;
import android.util.Log;
-import org.floens.chan.ChanBuild;
+import org.floens.chan.BuildConfig;
public class Logger {
private static final String TAG = "Clover";
private static final String TAG_SPACER = " | ";
public static boolean debugEnabled() {
- return ChanBuild.DEVELOPER_MODE;
+ return BuildConfig.DEVELOPER_MODE;
}
public static void v(String tag, String message) {
diff --git a/Clover/app/src/release/java/org/floens/chan/ChanBuild.java b/Clover/app/src/release/java/org/floens/chan/ChanBuild.java
deleted file mode 100644
index 91cfa3f3..00000000
--- a/Clover/app/src/release/java/org/floens/chan/ChanBuild.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Clover - 4chan browser https://github.com/Floens/Clover/
- * Copyright (C) 2014 Floens
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.floens.chan;
-
-// release version
-public class ChanBuild {
- public static final boolean DEVELOPER_MODE = false;
-}