diff --git a/squadleader/build.gradle b/squadleader/build.gradle index 43e0a99..8c889fc 100644 --- a/squadleader/build.gradle +++ b/squadleader/build.gradle @@ -18,7 +18,13 @@ android { 'src/rules/gson.pro', 'src/rules/butterknife.pro', 'src/rules/otto.pro', - 'src/rules/framework.pro' + 'src/rules/framework.pro', + 'src/rules/bundles.pro', + 'src/rules/icepick.pro', + 'src/rules/android-dart.pro', + 'src/rules/okio.pro', + 'src/rules/retrofit.pro', + 'src/rules/okhttp.pro' } buildTypes { debug { diff --git a/squadleader/src/rules/android-dart.pro b/squadleader/src/rules/android-dart.pro new file mode 100644 index 0000000..2a1de09 --- /dev/null +++ b/squadleader/src/rules/android-dart.pro @@ -0,0 +1,4 @@ +# Rules for Dart https://github.com/f2prateek/android-dart +-dontwarn com.f2prateek.dart.internal.** +-keep class **$$ExtraInjector { *; } +-keepnames class * { @com.f2prateek.dart.InjectExtra *;} \ No newline at end of file diff --git a/squadleader/src/rules/bundles.pro b/squadleader/src/rules/bundles.pro new file mode 100644 index 0000000..f4bb175 --- /dev/null +++ b/squadleader/src/rules/bundles.pro @@ -0,0 +1,3 @@ +# Rules for the bundles @Frozen and @Argument annotations https://bitbucket.org/hvisser/bundles +-dontwarn com.neenbedankt.bundles.processor.** +-dontwarn com.squareup.javawriter.JavaWriter diff --git a/squadleader/src/rules/icepick.pro b/squadleader/src/rules/icepick.pro new file mode 100644 index 0000000..bf14388 --- /dev/null +++ b/squadleader/src/rules/icepick.pro @@ -0,0 +1,4 @@ +# Rules for Icepick https://github.com/frankiesardo/icepick +-dontwarn icepick.** +-keep class **$$Icicle { *; } +-keepnames class * { @icepick.Icicle *;} \ No newline at end of file diff --git a/squadleader/src/rules/okhttp.pro b/squadleader/src/rules/okhttp.pro new file mode 100644 index 0000000..20ba0bf --- /dev/null +++ b/squadleader/src/rules/okhttp.pro @@ -0,0 +1,7 @@ +# Rules for OkHttp http://square.github.io/okhttp/ +-dontwarn com.squareup.okhttp.internal.** +# Okio +-dontwarn org.codehaus.mojo.animal_sniffer.** +-dontwarn java.nio.file.Files +-dontwarn java.nio.file.Path +-dontwarn java.nio.file.OpenOption \ No newline at end of file diff --git a/squadleader/src/rules/okio.pro b/squadleader/src/rules/okio.pro new file mode 100644 index 0000000..19ca0d4 --- /dev/null +++ b/squadleader/src/rules/okio.pro @@ -0,0 +1,5 @@ +# Rules for Okio https://github.com/square/okio/ +-dontwarn org.codehaus.mojo.animal_sniffer.** +-dontwarn java.nio.file.Files +-dontwarn java.nio.file.Path +-dontwarn java.nio.file.OpenOption \ No newline at end of file diff --git a/squadleader/src/rules/retrofit.pro b/squadleader/src/rules/retrofit.pro new file mode 100644 index 0000000..56361e3 --- /dev/null +++ b/squadleader/src/rules/retrofit.pro @@ -0,0 +1,6 @@ +# Rules for Retrofit +-dontwarn retrofit.RxSupport +-dontwarn retrofit.RxSupport$* +-dontwarn retrofit.appengine.** +-dontwarn retrofit.client.OkClient +-dontwarn retrofit.RestMethodInfo$RxSupport \ No newline at end of file diff --git a/verification/build.gradle b/verification/build.gradle index eb8b6fb..9f98a9f 100644 --- a/verification/build.gradle +++ b/verification/build.gradle @@ -23,6 +23,10 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt') } } + + packagingOptions { + exclude 'META-INF/services/javax.annotation.processing.Processor' + } } dependencies { @@ -30,4 +34,11 @@ dependencies { compile project(":squadleader") compile 'com.jakewharton:butterknife:5.1.2' compile 'com.squareup:otto:1.3.5' + compile 'com.github.frankiesardo:icepick:2.3.6' + provided 'com.github.frankiesardo:icepick-processor:2.3.6' + compile 'com.neenbedankt.bundles:frozen:1.0.4' + compile 'com.f2prateek.dart:dart:1.1.0' + compile 'com.squareup.okhttp:okhttp:2.0.0' + compile 'com.squareup.retrofit:retrofit:1.6.1' + compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0' } 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 6b79b9d..bb8c8e6 100644 --- a/verification/src/main/java/nl/littlerobots/squadleader/verification/MyActivity.java +++ b/verification/src/main/java/nl/littlerobots/squadleader/verification/MyActivity.java @@ -5,21 +5,32 @@ import android.view.View; import android.webkit.JavascriptInterface; +import com.f2prateek.dart.InjectExtra; +import com.squareup.okhttp.OkHttpClient; import com.squareup.otto.Produce; import com.squareup.otto.Subscribe; import butterknife.InjectView; import butterknife.OnClick; +import icepick.Icicle; import nl.littlerobots.squadleader.Keep; +import retrofit.RestAdapter.Builder; public class MyActivity extends Activity { + @Icicle + String icepickString; + @InjectExtra("test") + String dartString; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); // need a reference because otherwise ProGuard will strip out KeepFieldsTester KeepFieldsTester object = new KeepFieldsTester(); + OkHttpClient client = new OkHttpClient(); + RetrofitTester service = new Builder().setEndpoint("http://www.test.com").build().create(RetrofitTester.class); } @Subscribe diff --git a/verification/src/main/java/nl/littlerobots/squadleader/verification/RetrofitTester.java b/verification/src/main/java/nl/littlerobots/squadleader/verification/RetrofitTester.java new file mode 100644 index 0000000..182d45f --- /dev/null +++ b/verification/src/main/java/nl/littlerobots/squadleader/verification/RetrofitTester.java @@ -0,0 +1,8 @@ +package nl.littlerobots.squadleader.verification; + +import retrofit.http.GET; + +public interface RetrofitTester { + @GET("/test") + public String test(); +}