diff --git a/app/build.gradle b/app/build.gradle
index 2303e33838..06397b1857 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -4,10 +4,9 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
+apply plugin: 'com.github.zellius.shortcut-helper'
-if (file("custom.gradle").exists()) {
- apply from: "custom.gradle"
-}
+shortcutHelper.filePath = './shortcuts.xml'
ext {
// Git is needed in your system PATH for these commands to work.
@@ -31,7 +30,7 @@ ext {
android {
compileSdkVersion 26
- buildToolsVersion "26.0.1"
+ buildToolsVersion "26.0.2"
publishNonDefault true
defaultConfig {
@@ -68,15 +67,20 @@ android {
}
}
+ flavorDimensions "default"
+
productFlavors {
standard {
buildConfigField "boolean", "INCLUDE_UPDATER", "true"
+ dimension "default"
}
fdroid {
+ dimension "default"
}
dev {
minSdkVersion 21
resConfigs "en", "xxhdpi"
+ dimension "default"
}
}
@@ -247,38 +251,3 @@ kotlin {
coroutines 'enable'
}
}
-
-// add support for placeholders in resource files
-//https://code.google.com/p/android/issues/detail?id=69224
-def replacePlaceholdersInFile(basePath, fileName, placeholders) {
- def file = new File(basePath, fileName);
-
- if (!file.exists()) {
- logger.quiet("Unable to replace placeholders in " + file.toString() + ". File cannot be found.")
- return;
- }
-
- logger.debug("Replacing placeholders in " + file.toString())
- logger.debug("Placeholders: " + placeholders.toString())
-
- def content = file.getText('UTF-8')
-
- placeholders.each { entry ->
- content = content.replaceAll("\\\$\\{${entry.key}\\}", entry.value)
- }
-
- file.write(content, 'UTF-8')
-}
-
-afterEvaluate {
- android.applicationVariants.all { variant ->
- variant.outputs.each { output ->
- output.processResources.doFirst {
- // prepare placeholder map from manifestPlaceholders including applicationId placeholder
- def placeholders = variant.mergedFlavor.manifestPlaceholders + [applicationId: variant.applicationId]
-
- replacePlaceholdersInFile(resDir, 'xml-v25/shortcuts.xml', placeholders)
- }
- }
- }
-}
diff --git a/app/src/main/res/xml-v25/shortcuts.xml b/app/shortcuts.xml
similarity index 88%
rename from app/src/main/res/xml-v25/shortcuts.xml
rename to app/shortcuts.xml
index 574f1d5e1e..f0d74789ea 100644
--- a/app/src/main/res/xml-v25/shortcuts.xml
+++ b/app/shortcuts.xml
@@ -9,8 +9,7 @@
android:shortcutShortLabel="@string/label_library">
+ android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
+ android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
+ android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
+ android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0c88aa9d76..53d83cb319 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -26,8 +26,9 @@
-
+
+
+