From 2f05232bfe10180ac57f8abf595444105476899b Mon Sep 17 00:00:00 2001 From: Hugo Visser Date: Thu, 9 Oct 2014 16:57:00 +0200 Subject: [PATCH] Add config for EventBus --- squadleader/build.gradle | 3 ++- squadleader/src/rules/eventbus.pro | 4 ++++ .../nl/littlerobots/squadleader/verification/MyActivity.java | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 squadleader/src/rules/eventbus.pro diff --git a/squadleader/build.gradle b/squadleader/build.gradle index 55da519..b5f3e9f 100644 --- a/squadleader/build.gradle +++ b/squadleader/build.gradle @@ -24,7 +24,8 @@ android { 'src/rules/android-dart.pro', 'src/rules/okio.pro', 'src/rules/retrofit.pro', - 'src/rules/okhttp.pro' + 'src/rules/okhttp.pro', + 'src/rules/eventbus.pro' } buildTypes { debug { diff --git a/squadleader/src/rules/eventbus.pro b/squadleader/src/rules/eventbus.pro new file mode 100644 index 0000000..943dba8 --- /dev/null +++ b/squadleader/src/rules/eventbus.pro @@ -0,0 +1,4 @@ +# Rules for EventBus https://github.com/greenrobot/EventBus +-keepclassmembers class ** { + public void onEvent*(**); +} \ No newline at end of file diff --git a/verification/src/main/java/nl/littlerobots/squadleader/verification/MyActivity.java b/verification/src/main/java/nl/littlerobots/squadleader/verification/MyActivity.java index bb8c8e6..c685ec6 100644 --- a/verification/src/main/java/nl/littlerobots/squadleader/verification/MyActivity.java +++ b/verification/src/main/java/nl/littlerobots/squadleader/verification/MyActivity.java @@ -47,6 +47,10 @@ public void testOttoProduceAnnotation() { public void testKeepMethod() { } + public void onEvent(String dummy) { + + } + static final class ButterknifeTarget { @InjectView(R.id.test) View mTestView;