summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2019-05-28 17:26:09 +0200
committerByteHamster <info@bytehamster.com>2019-05-28 17:26:09 +0200
commitce8adc4b2654a78a8cbd8681935696e0b2a76f0a (patch)
tree5e33508f229f79fd0c40ef355bdda1f74a70a0f8
parent83a6d70387e8df95e04f198ef99f992aef674413 (diff)
downloadAntennaPod-ce8adc4b2654a78a8cbd8681935696e0b2a76f0a.zip
Use annotation processor for EventBus
-rw-r--r--app/build.gradle7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/PodcastApp.java6
-rw-r--r--core/build.gradle7
3 files changed, 20 insertions, 0 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 97b9596b9..b4812e083 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -24,6 +24,12 @@ android {
testApplicationId "de.test.antennapod"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
generatedDensities = []
+
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [ eventBusIndex : 'de.danoeh.antennapod.ApEventBusIndex' ]
+ }
+ }
}
signingConfigs {
@@ -145,6 +151,7 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"
implementation "com.squareup.okio:okio:$okioVersion"
implementation "org.greenrobot:eventbus:$eventbusVersion"
+ annotationProcessor "org.greenrobot:eventbus-annotation-processor:$eventbusVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
diff --git a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
index fde9af16f..cb2f597d6 100644
--- a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
+++ b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
@@ -8,9 +8,11 @@ import com.joanzapata.iconify.Iconify;
import com.joanzapata.iconify.fonts.FontAwesomeModule;
import com.joanzapata.iconify.fonts.MaterialModule;
+import de.danoeh.antennapod.core.ApCoreEventBusIndex;
import de.danoeh.antennapod.core.ClientConfig;
import de.danoeh.antennapod.core.feed.EventDistributor;
import de.danoeh.antennapod.spa.SPAUtil;
+import org.greenrobot.eventbus.EventBus;
/** Main application class. */
public class PodcastApp extends Application {
@@ -58,6 +60,10 @@ public class PodcastApp extends Application {
Iconify.with(new MaterialModule());
SPAUtil.sendSPAppsQueryFeedsIntent(this);
+ EventBus.builder()
+ .addIndex(new ApEventBusIndex())
+ .addIndex(new ApCoreEventBusIndex())
+ .installDefaultEventBus();
}
}
diff --git a/core/build.gradle b/core/build.gradle
index af6bb1203..961a26d10 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -10,6 +10,12 @@ android {
versionName "1.0"
testApplicationId "de.danoeh.antennapod.core.tests"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [ eventBusIndex : 'de.danoeh.antennapod.core.ApCoreEventBusIndex' ]
+ }
+ }
}
buildTypes {
release {
@@ -59,6 +65,7 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"
implementation "com.squareup.okio:okio:$okioVersion"
implementation "org.greenrobot:eventbus:$eventbusVersion"
+ annotationProcessor "org.greenrobot:eventbus-annotation-processor:$eventbusVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
implementation "org.awaitility:awaitility:$awaitilityVersion"