From 5f77728a7bf11a32d4803663c47964967d103b80 Mon Sep 17 00:00:00 2001 From: onlymash Date: Tue, 20 Mar 2018 19:53:19 +0800 Subject: [PATCH] use another package name for debug --- app/build.gradle | 13 +++++++++++++ app/src/main/AndroidManifest.xml | 2 +- .../java/com/hippo/ehviewer/ui/GalleryActivity.java | 3 ++- app/src/main/res/values-es/strings.xml | 2 -- app/src/main/res/values-ja/strings.xml | 2 -- app/src/main/res/values-zh-rCN/strings.xml | 2 -- app/src/main/res/values-zh-rHK/strings.xml | 2 -- app/src/main/res/values-zh-rTW/strings.xml | 2 -- app/src/main/res/values/strings.xml | 2 -- 9 files changed, 16 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3eb10fa19..387601654 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,6 +28,19 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + flavorDimensions "debugFlavor" + productFlavors { + releaseFlavor { + resValue "string", "app_name", "EhViewer" + applicationId "com.hippo.ehviewer" + buildConfigField 'String', 'AUTHORITY', '"com.hippo.ehviewer.fileprovider"' + } + debugFlavor { + resValue "string", "app_name", "EhViewerDebug" + applicationId "com.hippo.ehviewer.debug" + buildConfigField 'String', 'AUTHORITY', '"com.hippo.ehviewer.debug.fileprovider"' + } + } sourceSets { main { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d6f062d7e..14e20d468 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -144,7 +144,7 @@ diff --git a/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java b/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java index 2910c148f..9c0162570 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java @@ -49,6 +49,7 @@ import android.widget.TextView; import android.widget.Toast; import com.hippo.ehviewer.AppConfig; +import com.hippo.ehviewer.BuildConfig; import com.hippo.ehviewer.R; import com.hippo.ehviewer.Settings; import com.hippo.ehviewer.client.data.GalleryInfo; @@ -860,7 +861,7 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan Uri uri = new Uri.Builder() .scheme(ContentResolver.SCHEME_CONTENT) - .authority("com.hippo.ehviewer.fileprovider") + .authority(BuildConfig.AUTHORITY) .appendPath("image") .appendPath(filename) .build(); diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 43fb20963..74ba97869 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -17,8 +17,6 @@ - EhViewer - Página de inicio diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 6e844163b..4614e0e80 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -17,8 +17,6 @@ - EhViewer - ホームページ 人気 気に入り diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index b22fc099f..5aef8003f 100755 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -17,8 +17,6 @@ - EhViewer - 主页 热门 收藏 diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 24d4454e0..bdb8399cc 100755 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -17,8 +17,6 @@ - EhViewer - 主頁 熱門 收藏 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 66cbc724b..0b4d7a34f 100755 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -17,8 +17,6 @@ - EhViewer - 首頁 熱門 收藏 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a85315737..55e09e3eb 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -17,8 +17,6 @@ - EhViewer - e-hentai exhentai