From f9bd1bac365e7edd0e1a7170f4a348b1f3c7ed97 Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Thu, 19 Oct 2023 13:11:13 -0400 Subject: [PATCH] Revert "Upgrade eventbus to 3.3.1" This reverts commit 89199b81abeccb7c4641e48c57091e6c46337d82. --- app/build.gradle | 10 +------ .../securesms/ApplicationContext.java | 11 ++----- dependencies.gradle | 4 +-- device-transfer/lib/build.gradle | 10 +------ gradle/verification-metadata.xml | 30 ++----------------- 5 files changed, 8 insertions(+), 57 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index aac2691b6a..de059e0a58 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,7 +11,6 @@ plugins { id 'com.squareup.wire' id 'translations' id 'licenses' - id 'kotlin-kapt' } apply from: 'static-ips.gradle' @@ -437,12 +436,6 @@ android { } } -kapt { - arguments { - arg('eventBusIndex', 'org.thoughtcrime.securesms.SecuresmsEventBusIndex') - } -} - dependencies { implementation libs.androidx.fragment.ktx lintChecks project(':lintchecks') @@ -528,8 +521,7 @@ dependencies { implementation libs.glide.glide implementation libs.roundedimageview implementation libs.materialish.progress - implementation libs.greenrobot.eventbus.core - kapt libs.greenrobot.eventbus.annotation + implementation libs.greenrobot.eventbus implementation libs.google.zxing.android.integration implementation libs.google.zxing.core implementation libs.google.flexbox diff --git a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index f2d6ffce3e..214fddc6fe 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -34,7 +34,6 @@ import org.signal.core.util.concurrent.SignalExecutors; import org.signal.core.util.logging.AndroidLogger; import org.signal.core.util.logging.Log; import org.signal.core.util.tracing.Tracer; -import org.signal.devicetransfer.TransferEventBusIndex; import org.signal.glide.SignalGlideCodecs; import org.signal.libsignal.protocol.logging.SignalProtocolLoggerProvider; import org.signal.ringrtc.CallManager; @@ -113,7 +112,7 @@ import rxdogtag2.RxDogTag; /** * Will be called once when the TextSecure process is created. - *

+ * * We're using this as an insertion point to patch up the Android PRNG disaster, * to initialize the job manager, and to check for GCM registration freshness. * @@ -154,13 +153,7 @@ public class ApplicationContext extends MultiDexApplication implements AppForegr .addBlocking("security-provider", this::initializeSecurityProvider) .addBlocking("crash-handling", this::initializeCrashHandling) .addBlocking("rx-init", this::initializeRx) - .addBlocking("event-bus", () -> EventBus - .builder() - .logNoSubscriberMessages(false) - .logSubscriberExceptions(BuildConfig.DEBUG) - .addIndex(new TransferEventBusIndex()) - .addIndex(new SecuresmsEventBusIndex()) - .installDefaultEventBus()) + .addBlocking("event-bus", () -> EventBus.builder().logNoSubscriberMessages(false).installDefaultEventBus()) .addBlocking("app-dependencies", this::initializeAppDependencies) .addBlocking("first-launch", this::initializeFirstEverAppLaunch) .addBlocking("app-migrations", this::initializeApplicationMigrations) diff --git a/dependencies.gradle b/dependencies.gradle index 850a28c992..80647b8ff9 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -20,7 +20,6 @@ dependencyResolutionManagement { version('android-gradle-plugin', '8.0.2') version('accompanist', '0.28.0') version('nanohttpd', '2.3.1') - version('eventbus', '3.3.1') // Android Plugins library('android-library', 'com.android.library', 'com.android.library.gradle.plugin').versionRef('android-gradle-plugin') @@ -121,8 +120,7 @@ dependencyResolutionManagement { library('signal-android-database-sqlcipher', 'org.signal:sqlcipher-android:4.5.4-S2') // Third Party - library('greenrobot-eventbus-core', 'org.greenrobot', 'eventbus').versionRef('eventbus') - library('greenrobot-eventbus-annotation', 'org.greenrobot', 'eventbus-annotation-processor').versionRef('eventbus') + library('greenrobot-eventbus', 'org.greenrobot:eventbus:3.0.0') library('jackson-core', 'com.fasterxml.jackson.core:jackson-databind:2.9.9.2') library('jackson-module-kotlin', 'com.fasterxml.jackson.module:jackson-module-kotlin:2.12.0') library('square-okhttp3', 'com.squareup.okhttp3:okhttp:3.12.13') diff --git a/device-transfer/lib/build.gradle b/device-transfer/lib/build.gradle index a7abbf33d4..a797034260 100644 --- a/device-transfer/lib/build.gradle +++ b/device-transfer/lib/build.gradle @@ -1,23 +1,15 @@ plugins { id 'signal-library' - id 'kotlin-kapt' } android { namespace 'org.signal.devicetransfer' } -kapt { - arguments { - arg('eventBusIndex', 'org.signal.devicetransfer.TransferEventBusIndex') - } -} - dependencies { implementation project(':core-util') implementation libs.libsignal.android - api libs.greenrobot.eventbus.core - kapt libs.greenrobot.eventbus.annotation + api libs.greenrobot.eventbus testImplementation (testLibs.robolectric.robolectric) { exclude group: 'com.google.protobuf', module: 'protobuf-java' diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 60592f98fb..53cf3c3527 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -3730,11 +3730,6 @@ https://docs.gradle.org/current/userguide/dependency_verification.html - - - - - @@ -4424,28 +4419,9 @@ https://docs.gradle.org/current/userguide/dependency_verification.html - - - - - - - - - - - - - - - - - - - - - - + + +