From 7bb48465e21a8468a5a9ed61b81989903c8b36a4 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 2 Nov 2019 15:44:31 +0100 Subject: [PATCH] rename build flavors --- build.gradle | 35 +++++--- .../messenger/services/EmojiService.java | 0 .../services/PushManagementService.java | 0 .../ui/widget/EmojiWrapperEditText.java | 0 src/main/java/de/pixart/messenger/Config.java | 2 +- .../AndroidManifest.xml | 0 .../messenger/services/EmojiService.java | 0 .../services/MaintenanceReceiver.java | 0 .../services/PushManagementService.java | 0 .../services/PushMessageReceiver.java | 0 .../ui/widget/EmojiWrapperEditText.java | 17 ++++ src/schulchat/res/values/about.xml | 51 ++++++++++++ src/schulchat/res/values/defaults.xml | 81 +++++++++++++++++++ 13 files changed, 172 insertions(+), 14 deletions(-) rename src/{standard => git}/java/de/pixart/messenger/services/EmojiService.java (100%) rename src/{standard => git}/java/de/pixart/messenger/services/PushManagementService.java (100%) rename src/{main => git}/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java (100%) rename src/{standardPush => playstore}/AndroidManifest.xml (100%) rename src/{standardPush => playstore}/java/de/pixart/messenger/services/EmojiService.java (100%) rename src/{standardPush => playstore}/java/de/pixart/messenger/services/MaintenanceReceiver.java (100%) rename src/{standardPush => playstore}/java/de/pixart/messenger/services/PushManagementService.java (100%) rename src/{standardPush => playstore}/java/de/pixart/messenger/services/PushMessageReceiver.java (100%) create mode 100644 src/playstore/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java create mode 100644 src/schulchat/res/values/about.xml create mode 100644 src/schulchat/res/values/defaults.xml diff --git a/build.gradle b/build.gradle index 520f606b3..6226e9e9d 100644 --- a/build.gradle +++ b/build.gradle @@ -33,14 +33,14 @@ repositories { } configurations { - standardPushImplementation - standardImplementation - schulchatImplementation + playstoreImplementation + gitImplementation + playstoreschulchatImplementation } dependencies { implementation project(':libs:android-transcoder') - standardPushImplementation('com.google.firebase:firebase-messaging:20.0.0') { + playstoreImplementation('com.google.firebase:firebase-messaging:20.0.0') { exclude group: 'com.google.firebase', module: 'firebase-core' exclude group: 'com.google.firebase', module: 'firebase-analytics' exclude group: 'com.google.firebase', module: 'firebase-measurement-connector' @@ -66,8 +66,8 @@ dependencies { implementation 'androidx.exifinterface:exifinterface:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.emoji:emoji:1.0.0' - standardImplementation 'androidx.emoji:emoji-bundled:1.0.0' - implementation 'androidx.emoji:emoji-appcompat:1.0.0' + gitImplementation 'androidx.emoji:emoji-appcompat:1.0.0' + gitImplementation 'androidx.emoji:emoji-bundled:1.0.0' implementation 'androidx.exifinterface:exifinterface:1.0.0' implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' @@ -113,6 +113,7 @@ android { archivesBaseName += "-$versionName" applicationId "de.pixart.messenger" multiDexEnabled true + buildConfigField("String", "LOGTAG", '"Pix-Art_Messenger"') buildConfigField("String", "UPDATE_URL", '"https://xmpp.pix-art.de/Pix-Art_Messenger/update/"') resValue "string", "applicationId", applicationId resValue "string", "app_name", "Pix-Art Messenger" @@ -135,21 +136,29 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } - flavorDimensions("distribution") + flavorDimensions("mode", "distribution") productFlavors { - standardPush { - dimension "distribution" - } - standard { - dimension "distribution" + pixart { + dimension "mode" } schulchat { - dimension "distribution" + dimension "mode" applicationId = 'de.schulchat.messenger' + resValue "string", "applicationId", applicationId + resValue "string", "app_name", "Schulchat Messenger" + buildConfigField("String", "LOGTAG", '"Schulchat_Messenger"') versionCode = 1 versionName = '1.0.0' } + playstore { + dimension "distribution" + versionNameSuffix "+_playstore" + } + git { + dimension "distribution" + versionNameSuffix "+_git" + } } if (project.hasProperty('mStoreFile') && project.hasProperty('mStorePassword') && diff --git a/src/standard/java/de/pixart/messenger/services/EmojiService.java b/src/git/java/de/pixart/messenger/services/EmojiService.java similarity index 100% rename from src/standard/java/de/pixart/messenger/services/EmojiService.java rename to src/git/java/de/pixart/messenger/services/EmojiService.java diff --git a/src/standard/java/de/pixart/messenger/services/PushManagementService.java b/src/git/java/de/pixart/messenger/services/PushManagementService.java similarity index 100% rename from src/standard/java/de/pixart/messenger/services/PushManagementService.java rename to src/git/java/de/pixart/messenger/services/PushManagementService.java diff --git a/src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java b/src/git/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java similarity index 100% rename from src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java rename to src/git/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java diff --git a/src/main/java/de/pixart/messenger/Config.java b/src/main/java/de/pixart/messenger/Config.java index 72aacf397..2d0c4acb9 100644 --- a/src/main/java/de/pixart/messenger/Config.java +++ b/src/main/java/de/pixart/messenger/Config.java @@ -39,7 +39,7 @@ public final class Config { return (ENCRYPTION_MASK & (ENCRYPTION_MASK - 1)) != 0; } - public static final String LOGTAG = "Pix-Art_Messenger"; + public static final String LOGTAG = BuildConfig.LOGTAG; public static final Jid BUG_REPORTS = Jid.of("bugs@pix-art.de"); diff --git a/src/standardPush/AndroidManifest.xml b/src/playstore/AndroidManifest.xml similarity index 100% rename from src/standardPush/AndroidManifest.xml rename to src/playstore/AndroidManifest.xml diff --git a/src/standardPush/java/de/pixart/messenger/services/EmojiService.java b/src/playstore/java/de/pixart/messenger/services/EmojiService.java similarity index 100% rename from src/standardPush/java/de/pixart/messenger/services/EmojiService.java rename to src/playstore/java/de/pixart/messenger/services/EmojiService.java diff --git a/src/standardPush/java/de/pixart/messenger/services/MaintenanceReceiver.java b/src/playstore/java/de/pixart/messenger/services/MaintenanceReceiver.java similarity index 100% rename from src/standardPush/java/de/pixart/messenger/services/MaintenanceReceiver.java rename to src/playstore/java/de/pixart/messenger/services/MaintenanceReceiver.java diff --git a/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java b/src/playstore/java/de/pixart/messenger/services/PushManagementService.java similarity index 100% rename from src/standardPush/java/de/pixart/messenger/services/PushManagementService.java rename to src/playstore/java/de/pixart/messenger/services/PushManagementService.java diff --git a/src/standardPush/java/de/pixart/messenger/services/PushMessageReceiver.java b/src/playstore/java/de/pixart/messenger/services/PushMessageReceiver.java similarity index 100% rename from src/standardPush/java/de/pixart/messenger/services/PushMessageReceiver.java rename to src/playstore/java/de/pixart/messenger/services/PushMessageReceiver.java diff --git a/src/playstore/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java b/src/playstore/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java new file mode 100644 index 000000000..662669fa3 --- /dev/null +++ b/src/playstore/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java @@ -0,0 +1,17 @@ +package de.pixart.messenger.ui.widget; + +import android.content.Context; +import android.util.AttributeSet; + +import androidx.appcompat.widget.AppCompatEditText; + +public class EmojiWrapperEditText extends AppCompatEditText { + + public EmojiWrapperEditText(Context context) { + super(context); + } + + public EmojiWrapperEditText(Context context, AttributeSet attrs) { + super(context, attrs); + } +} \ No newline at end of file diff --git a/src/schulchat/res/values/about.xml b/src/schulchat/res/values/about.xml new file mode 100644 index 000000000..8cdc8db36 --- /dev/null +++ b/src/schulchat/res/values/about.xml @@ -0,0 +1,51 @@ + + + Schulchat Messenger + \n\nCopyright © 2014-2019 Christian Schneppe + \n\nhttps://schulchat.de + \n\nThis 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. + \n\nThis 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. + \n\nYou should have received a copy of the GNU General Public License + along with this program. If not, see https://www.gnu.org/licenses + + Libraries + \n\nhttps://www.bouncycastle.org\n(The MIT License (MIT)) + \n\nhttps://www.gnu.org/software/libidn\n(Apache License, Version 2.0) + \n\nhttps://github.com/ge0rg/MemorizingTrustManager\n(The MIT License (MIT)) + \n\nhttps://github.com/MiniDNS/minidns\n(WTFPL) + \n\nhttps://github.com/open-keychain/openkeychain-api-lib\n(Apache License, Version 2.0) + \n\nhttps://github.com/jitsi/otr4j\n(LGPL-3.0) + \n\nhttps://developer.android.com/tools/support-library\n(Apache License, Version 2.0) + \n\nhttps://github.com/google/material-design-icons\n(CC BY 4.0) + \n\nhttps://github.com/leolin310148/ShortcutBadger\n(Apache License, Version 2.0) + \n\nhttps://github.com/kyleduo/SwitchButton\n(Apache License, Version 2.0) + \n\nhttps://github.com/WhisperSystems/libaxolotl-java\n(GPLv3) + \n\nhttps://github.com/vinc3m1/RoundedImageView\n(Apache License, Version 2.0) + \n\nhttps://github.com/jdamcd/android-crop\n(Apache License, Version 2.0) + \n\nhttps://github.com/google/gson\n(Apache License, Version 2.0) + \n\nhttp://hc.apache.org/httpcomponents-client\n(Apache License, Version 2.0) + \n\nhttp://hc.apache.org/httpcomponents-core\n(Apache License, Version 2.0) + \n\nhttps://github.com/square/picasso\n(Apache License, Version 2.0) + \n\nhttps://github.com/davemorrissey/subsampling-scale-image-view\n(Apache License, Version 2.0) + \n\nhttps://github.com/koral--/android-gif-drawable\n(The MIT License (MIT)) + \n\nhttps://github.com/rtoshiro/FullscreenVideoView\n(Apache License, Version 2.0) + \n\nhttps://github.com/mangstadt/ez-vcard\n(FreeBSD) + \n\nhttps://github.com/googlesamples/easypermissions\n(Apache License, Version 2.0) + \n\nhttps://github.com/blazsolar/FlowLayout\n(Apache License, Version 2.0) + \n\nhttps://github.com/ypresto/android-transcoder\n(Apache License, Version 2.0) + \n\nhttp://www.eclipse.org/jetty/\n(Apache License, Version 2.0 and Eclipse Public License 1.0) + \n\nhttp://leafletjs.com/\n(BSD 2-Clause) + \n\nhttps://www.openstreetmap.org/\n(Open Database License) + \n\nhttp://xmpp.rocks/\n(The MIT License (MIT)) + \n\nhttps://github.com/drakeet/ToastCompat/\n(Apache License, Version 2.0) + \n\nhttps://github.com/leinardi/FloatingActionButtonSpeedDial/\n(Apache License, Version 2.0) + \n\nhttps://github.com/PonnamKarthik/RichLinkPreview\n(Apache License, Version 2.0) + \n\nhttps://github.com/AppIntro/AppIntro\n(Apache License, Version 2.0) + + \ No newline at end of file diff --git a/src/schulchat/res/values/defaults.xml b/src/schulchat/res/values/defaults.xml new file mode 100644 index 000000000..6d96c3de0 --- /dev/null +++ b/src/schulchat/res/values/defaults.xml @@ -0,0 +1,81 @@ + + + Computer + Mobile phone + Tablet + Web browser + Console + + true + false + false + false + true + true + true + true + false + true + false + true + true + true + true + true + false + false + true + false + true + true + false + false + false + true + true + true + false + false + false + true + false + true + false + true + true + false + true + true + false + false + true + true + true + false + false + true + 10485760 + 524288 + 0 + 0 + 144 + Phone + content://settings/system/notification_sound + auto + mid + mid + recent + default_off + auto + small + + + + + + + + + + +