From f59b51268d8ca02ba5200e49e699ea6f6f3a35da Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 27 Jul 2020 09:32:27 -0700 Subject: [PATCH] Revert "Remove mqtt from f-droid build" This reverts commit 7583c26e4108cc349748dcc6aee5d298c7d5f1cf. --- xwords4/android/app/build.gradle | 9 ++- .../org/eehouse/android/xw4/MQTTUtils.java | 0 .../eehouse/android/xw4/PrefsDelegate.java | 4 +- .../java/org/eehouse/android/xw4/XWApp.java | 4 +- .../org/eehouse/android/xw4/MQTTUtils.java | 1 - .../org/eehouse/android/xw4/MQTTUtils.java | 1 - .../org/eehouse/android/xw4/MQTTUtils.java | 81 ------------------- 7 files changed, 7 insertions(+), 93 deletions(-) rename xwords4/android/app/src/{xw4SMS => main}/java/org/eehouse/android/xw4/MQTTUtils.java (100%) delete mode 120000 xwords4/android/app/src/xw4NoSMS/java/org/eehouse/android/xw4/MQTTUtils.java delete mode 120000 xwords4/android/app/src/xw4d/java/org/eehouse/android/xw4/MQTTUtils.java delete mode 100644 xwords4/android/app/src/xw4fdroid/java/org/eehouse/android/xw4/MQTTUtils.java diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index 280f4d63d..92b870c73 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -36,8 +36,10 @@ if ( FABRIC_API_KEY && hasProperty('useCrashlytics') ) { // rm-for-fdroid } // rm-for-fdroid repositories { google() - maven { url 'https://maven.fabric.io/public' } // rm-for-fdroid - maven { url "https://repo.eclipse.org/content/repositories/paho-releases/" } // rm-for-fdroid + maven { url 'https://maven.fabric.io/public' } // rm-for-fdroid + maven { + url "https://repo.eclipse.org/content/repositories/paho-releases/" + } } android { @@ -120,7 +122,6 @@ android { resValue "string", "nfc_aid", "$NFC_AID_XW4" externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4fdroid'] externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XW_UUID] - buildConfigField "boolean", "OFFER_MQTT", "false" } xw4d { @@ -336,7 +337,7 @@ dependencies { implementation 'com.github.eehouse:nbsproxy:v0.2.2' - implementation "org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.+" // rm-for-fdroid + implementation "org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.+" } task mkImages(type: Exec) { diff --git a/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/MQTTUtils.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/MQTTUtils.java similarity index 100% rename from xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/MQTTUtils.java rename to xwords4/android/app/src/main/java/org/eehouse/android/xw4/MQTTUtils.java diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/PrefsDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/PrefsDelegate.java index 97f5c2e56..65919a3a8 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/PrefsDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/PrefsDelegate.java @@ -243,9 +243,7 @@ public class PrefsDelegate extends DelegateBase case R.string.key_mqtt_host: case R.string.key_mqtt_port: case R.string.key_mqtt_qos: - if ( BuildConfig.OFFER_MQTT ) { - MQTTUtils.onConfigChanged( m_activity ); - } + MQTTUtils.onConfigChanged( m_activity ); break; default: Assert.failDbg(); diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWApp.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWApp.java index c0eb7b352..4528b4884 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWApp.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWApp.java @@ -102,9 +102,7 @@ public class XWApp extends Application DupeModeTimer.init( this ); - if ( BuildConfig.OFFER_MQTT ) { - MQTTUtils.init( this ); - } + MQTTUtils.init( this ); } @OnLifecycleEvent(ON_ANY) diff --git a/xwords4/android/app/src/xw4NoSMS/java/org/eehouse/android/xw4/MQTTUtils.java b/xwords4/android/app/src/xw4NoSMS/java/org/eehouse/android/xw4/MQTTUtils.java deleted file mode 120000 index 811f81ea5..000000000 --- a/xwords4/android/app/src/xw4NoSMS/java/org/eehouse/android/xw4/MQTTUtils.java +++ /dev/null @@ -1 +0,0 @@ -../../../../../../xw4SMS/java/org/eehouse/android/xw4/MQTTUtils.java \ No newline at end of file diff --git a/xwords4/android/app/src/xw4d/java/org/eehouse/android/xw4/MQTTUtils.java b/xwords4/android/app/src/xw4d/java/org/eehouse/android/xw4/MQTTUtils.java deleted file mode 120000 index 811f81ea5..000000000 --- a/xwords4/android/app/src/xw4d/java/org/eehouse/android/xw4/MQTTUtils.java +++ /dev/null @@ -1 +0,0 @@ -../../../../../../xw4SMS/java/org/eehouse/android/xw4/MQTTUtils.java \ No newline at end of file diff --git a/xwords4/android/app/src/xw4fdroid/java/org/eehouse/android/xw4/MQTTUtils.java b/xwords4/android/app/src/xw4fdroid/java/org/eehouse/android/xw4/MQTTUtils.java deleted file mode 100644 index bee3e6d59..000000000 --- a/xwords4/android/app/src/xw4fdroid/java/org/eehouse/android/xw4/MQTTUtils.java +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- compile-command: "find-and-gradle.sh -PuseCrashlytics insXw4dDeb"; -*- */ -/* - * Copyright 2020 by Eric House (xwords@eehouse.org). All rights reserved. - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package org.eehouse.android.xw4; - -import android.content.Context; - -import org.eehouse.android.xw4.jni.CommsAddrRec; - -public class MQTTUtils { - private static final String TAG = MQTTUtils.class.getSimpleName(); - - public static void init( Context context ) - { - logUnimpl( "init" ); - } - - public static void onResume( Context context ) - { - logUnimpl( "onResume" ); - } - - public static int send( Context context, String addressee, int gameID, byte[] buf ) - { - logUnimpl( "send" ); - return -1; - } - - public static void handleMessage( Context context, CommsAddrRec from, - int gameID, byte[] data ) - { - logUnimpl( "handleMessage" ); - } - - public static void handleGameGone( Context context, CommsAddrRec from, int gameID ) - { - logUnimpl( "handleGameGone" ); - } - - public static void gameDied( String devID, int gameID ) - { - logUnimpl( "gameDied" ); - } - - public static void timerFired( Context context ) - { - logUnimpl( "timerFired" ); - } - - static void onConfigChanged( Context context ) - { - logUnimpl( "onConfigChanged" ); - } - - public static void inviteRemote( Context context, String invitee, NetLaunchInfo nli ) - { - logUnimpl( "inviteRemote" ); - } - - private static void logUnimpl( String name ) - { - Log.d( TAG, "%s(): UNIMPLEMENTED", name ); - } - -}