From a35ed2e9b166b86065f43578d9d888b5035db769 Mon Sep 17 00:00:00 2001 From: Peter Storch Date: Tue, 11 Aug 2020 21:12:18 +0200 Subject: [PATCH] move debug resources into debug and cleanup build.gradle --- build.gradle | 9 --------- .../content/DescriptionGeneratorTest.java | 4 ++-- .../res/mipmap-anydpi-v26/ic_launcher.xml} | 2 +- .../res/mipmap-hdpi/ic_launcher.png} | Bin .../res/mipmap-mdpi/ic_launcher.png} | Bin .../res/mipmap-xhdpi/ic_launcher.png} | Bin .../res/mipmap-xxhdpi/ic_launcher.png} | Bin .../res/mipmap-xxxhdpi/ic_launcher.png} | Bin .../res/values/ic_launcher_background.xml} | 2 +- src/debug/res/values/strings.xml | 18 ++++++++++++++++++ src/main/AndroidManifest.xml | 4 ++-- 11 files changed, 24 insertions(+), 15 deletions(-) rename src/{main/res/mipmap-anydpi-v26/ic_launcher_debug.xml => debug/res/mipmap-anydpi-v26/ic_launcher.xml} (72%) rename src/{main/res/mipmap-hdpi/ic_launcher_debug.png => debug/res/mipmap-hdpi/ic_launcher.png} (100%) rename src/{main/res/mipmap-mdpi/ic_launcher_debug.png => debug/res/mipmap-mdpi/ic_launcher.png} (100%) rename src/{main/res/mipmap-xhdpi/ic_launcher_debug.png => debug/res/mipmap-xhdpi/ic_launcher.png} (100%) rename src/{main/res/mipmap-xxhdpi/ic_launcher_debug.png => debug/res/mipmap-xxhdpi/ic_launcher.png} (100%) rename src/{main/res/mipmap-xxxhdpi/ic_launcher_debug.png => debug/res/mipmap-xxxhdpi/ic_launcher.png} (100%) rename src/{main/res/values/ic_launcher_debug_background.xml => debug/res/values/ic_launcher_background.xml} (50%) create mode 100644 src/debug/res/values/strings.xml diff --git a/build.gradle b/build.gradle index 8efe5a0ec..e2edbf601 100644 --- a/build.gradle +++ b/build.gradle @@ -45,11 +45,6 @@ android { defaultConfig { applicationId "de.dennisguse.opentracks" - manifestPlaceholders = [ - applicationLogo: "@mipmap/ic_launcher", - applicationName: "@string/app_name" - ] - versionCode 3474 versionName "v3.8.1" @@ -67,10 +62,6 @@ android { debug { applicationIdSuffix ".debug" versionNameSuffix "-debug" - manifestPlaceholders = [ - applicationLogo: "@mipmap/ic_launcher_debug", - applicationName: "OpenTracks (Debug)" - ] } release { diff --git a/src/androidTest/java/de/dennisguse/opentracks/content/DescriptionGeneratorTest.java b/src/androidTest/java/de/dennisguse/opentracks/content/DescriptionGeneratorTest.java index 232b7f620..5d720c4b8 100644 --- a/src/androidTest/java/de/dennisguse/opentracks/content/DescriptionGeneratorTest.java +++ b/src/androidTest/java/de/dennisguse/opentracks/content/DescriptionGeneratorTest.java @@ -67,7 +67,7 @@ public class DescriptionGeneratorTest { track.setTrackStatistics(stats); track.setCategory("hiking"); String expected = //"Created by" - "OpenTracks

" + "OpenTracks (Debug)

" + "Name: -
" + "Activity type: hiking
" + "Description: -
" @@ -103,7 +103,7 @@ public class DescriptionGeneratorTest { track.setTrackStatistics(stats); track.setCategory("hiking"); String expected = //"Created by" - "OpenTracks

" + "OpenTracks (Debug)

" + "Name: -
" + "Activity type: hiking
" + "Description: -
" diff --git a/src/main/res/mipmap-anydpi-v26/ic_launcher_debug.xml b/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 72% rename from src/main/res/mipmap-anydpi-v26/ic_launcher_debug.xml rename to src/debug/res/mipmap-anydpi-v26/ic_launcher.xml index c3529d0bd..ed0bdfeb3 100644 --- a/src/main/res/mipmap-anydpi-v26/ic_launcher_debug.xml +++ b/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/src/main/res/mipmap-hdpi/ic_launcher_debug.png b/src/debug/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from src/main/res/mipmap-hdpi/ic_launcher_debug.png rename to src/debug/res/mipmap-hdpi/ic_launcher.png diff --git a/src/main/res/mipmap-mdpi/ic_launcher_debug.png b/src/debug/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from src/main/res/mipmap-mdpi/ic_launcher_debug.png rename to src/debug/res/mipmap-mdpi/ic_launcher.png diff --git a/src/main/res/mipmap-xhdpi/ic_launcher_debug.png b/src/debug/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from src/main/res/mipmap-xhdpi/ic_launcher_debug.png rename to src/debug/res/mipmap-xhdpi/ic_launcher.png diff --git a/src/main/res/mipmap-xxhdpi/ic_launcher_debug.png b/src/debug/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from src/main/res/mipmap-xxhdpi/ic_launcher_debug.png rename to src/debug/res/mipmap-xxhdpi/ic_launcher.png diff --git a/src/main/res/mipmap-xxxhdpi/ic_launcher_debug.png b/src/debug/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from src/main/res/mipmap-xxxhdpi/ic_launcher_debug.png rename to src/debug/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/src/main/res/values/ic_launcher_debug_background.xml b/src/debug/res/values/ic_launcher_background.xml similarity index 50% rename from src/main/res/values/ic_launcher_debug_background.xml rename to src/debug/res/values/ic_launcher_background.xml index a600d78d2..77e38f988 100644 --- a/src/main/res/values/ic_launcher_debug_background.xml +++ b/src/debug/res/values/ic_launcher_background.xml @@ -1,4 +1,4 @@ - #8F0000 + #8F0000 \ No newline at end of file diff --git a/src/debug/res/values/strings.xml b/src/debug/res/values/strings.xml new file mode 100644 index 000000000..aa9000336 --- /dev/null +++ b/src/debug/res/values/strings.xml @@ -0,0 +1,18 @@ + + + OpenTracks (Debug) + diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index b25f32940..6510e78d8 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -52,8 +52,8 @@ limitations under the License. android:allowBackup="false" android:hasFragileUserData="true" android:hardwareAccelerated="true" - android:icon="${applicationLogo}" - android:label="${applicationName}" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" android:theme="@style/ThemeCustom">