From 054125cdad8dcc43f3cb1b3e949920bd5e375ab3 Mon Sep 17 00:00:00 2001 From: Andrzej Chmielewski Date: Wed, 10 Aug 2016 15:48:12 +0200 Subject: [PATCH 1/6] adding custom PresentationModelSerializer support --- .../appflate/droidmvp/DroidMVPActivity.java | 12 ++++- .../appflate/droidmvp/DroidMVPFragment.java | 45 ++++++++++++++----- .../droidmvp/DroidMVPViewDelegate.java | 31 +++---------- ...rializablePresentationModelSerializer.java | 38 ++++++++++++++++ .../droidmvp/PresentationModelSerializer.java | 12 +++++ 5 files changed, 100 insertions(+), 38 deletions(-) create mode 100644 library/src/main/java/io/appflate/droidmvp/ParcelableAndSerializablePresentationModelSerializer.java create mode 100644 library/src/main/java/io/appflate/droidmvp/PresentationModelSerializer.java diff --git a/library/src/main/java/io/appflate/droidmvp/DroidMVPActivity.java b/library/src/main/java/io/appflate/droidmvp/DroidMVPActivity.java index 3ab97a2..f8a547f 100644 --- a/library/src/main/java/io/appflate/droidmvp/DroidMVPActivity.java +++ b/library/src/main/java/io/appflate/droidmvp/DroidMVPActivity.java @@ -20,12 +20,11 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; -import java.io.Serializable; public abstract class DroidMVPActivity> extends AppCompatActivity implements DroidMVPView { - private DroidMVPViewDelegate mvpDelegate = new DroidMVPViewDelegate() { + private DroidMVPViewDelegate mvpDelegate = new DroidMVPViewDelegate(createPresentationModelSerializer()) { @NonNull @Override protected P createPresenter() { return DroidMVPActivity.this.createPresenter(); } @@ -65,6 +64,15 @@ public abstract class DroidMVPActivity createPresentationModelSerializer() { + return new ParcelableAndSerializablePresentationModelSerializer<>(); + } + /** * Used for performing field injection trough various dependency injection frameworks like * Dagger. The injection is performed just before the #createPresenter() or diff --git a/library/src/main/java/io/appflate/droidmvp/DroidMVPFragment.java b/library/src/main/java/io/appflate/droidmvp/DroidMVPFragment.java index 4d70d26..28e0859 100644 --- a/library/src/main/java/io/appflate/droidmvp/DroidMVPFragment.java +++ b/library/src/main/java/io/appflate/droidmvp/DroidMVPFragment.java @@ -22,45 +22,64 @@ import android.support.v4.app.Fragment; public abstract class DroidMVPFragment> - extends Fragment implements DroidMVPView { + extends Fragment implements DroidMVPView { - private DroidMVPViewDelegate mvpDelegate = new DroidMVPViewDelegate() { - @NonNull @Override protected P createPresenter() { + private DroidMVPViewDelegate mvpDelegate = new DroidMVPViewDelegate(createPresentationModelSerializer()) { + @NonNull + @Override + protected P createPresenter() { return DroidMVPFragment.this.createPresenter(); } - @NonNull @Override protected M createPresentationModel() { + @NonNull + @Override + protected M createPresentationModel() { return DroidMVPFragment.this.createPresentationModel(); } }; - @Override public void onCreate(@Nullable Bundle savedInstanceState) { + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); performFieldInjection(); mvpDelegate.onCreate(this, savedInstanceState); } - @Override public void onStart() { + @Override + public void onStart() { super.onStart(); mvpDelegate.onStart((V) this); } - @Override public void onSaveInstanceState(Bundle outState) { + @Override + public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); mvpDelegate.onSaveInstanceState(outState); } - @Override public void onStop() { + @Override + public void onStop() { super.onStop(); mvpDelegate.onStop(); } - @Override public void onDestroy() { + @Override + public void onDestroy() { super.onDestroy(); mvpDelegate.onDestroy(); } - @NonNull protected P getPresenter() { + /** + * Feel free to override this method that returns your own implementation of PresentationModelSerializer. + * Useful if you use a Parceler library for example + * @return an instance of PresentationModelSerializer that will serialize and deserialize your PresentationModel from Bundle. + */ + protected PresentationModelSerializer createPresentationModelSerializer() { + return new ParcelableAndSerializablePresentationModelSerializer<>(); + } + + @NonNull + protected P getPresenter() { return mvpDelegate.getPresenter(); } @@ -77,7 +96,8 @@ public abstract class DroidMVPFragment serializer; private String presentationModelKey; + public DroidMVPViewDelegate(@NonNull PresentationModelSerializer serializer) { + this.serializer = serializer; + } + /** * Commonly called from fragment's/activity's onCreate. Presentation Model is either created or * restored @@ -50,7 +55,7 @@ public abstract class DroidMVPViewDelegate implements PresentationModelSerializer { + public M restorePresentationModel(Bundle savedInstanceState, String presentationModelKey) { + if (savedInstanceState != null) { + Object potentialPresentationModel = savedInstanceState.get(presentationModelKey); + try { + return (M) potentialPresentationModel; + } catch (ClassCastException ex) { + throw new IllegalStateException(String.format( + "We expected a presentationModel saved in the bundle under the key: \"%s\", but was: %s", + presentationModelKey, potentialPresentationModel.toString())); + } + } + return null; + } + + @Override + public void savePresentationModel(Bundle outState, String presentationModelKey, M presentationModel) { + if (presentationModel instanceof Parcelable) { + outState.putParcelable(presentationModelKey, (Parcelable) presentationModel); + } else if (presentationModel instanceof Serializable) { + outState.putSerializable(presentationModelKey, (Serializable) presentationModel); + } else { + throw new IllegalArgumentException( + "Your presentation model must either implement Parcelable or Serializable interface: " + + presentationModel.getClass().getCanonicalName()); + } + } +} diff --git a/library/src/main/java/io/appflate/droidmvp/PresentationModelSerializer.java b/library/src/main/java/io/appflate/droidmvp/PresentationModelSerializer.java new file mode 100644 index 0000000..4d7019d --- /dev/null +++ b/library/src/main/java/io/appflate/droidmvp/PresentationModelSerializer.java @@ -0,0 +1,12 @@ +package io.appflate.droidmvp; + +import android.os.Bundle; + +/** + * Objects of this class are used to serialize and deserialize PresentationModel to/from the Bundle object. + */ +public interface PresentationModelSerializer { + M restorePresentationModel(Bundle savedInstanceState, String presentationModelKey); + + void savePresentationModel(Bundle outState, String presentationModelKey, M presentationModel); +} From 8383511080f22cf500cd4175995e5c2fd7570b83 Mon Sep 17 00:00:00 2001 From: Andrzej Chmielewski Date: Wed, 10 Aug 2016 15:58:33 +0200 Subject: [PATCH 2/6] bumping support versions to 24.1.0 --- library/build.gradle | 2 +- sample-dagger/build.gradle | 8 ++++---- sample-parcelable/build.gradle | 8 ++++---- sample/build.gradle | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/library/build.gradle b/library/build.gradle index 64434f9..ae786a3 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -46,6 +46,6 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:24.0.0' + compile 'com.android.support:appcompat-v7:24.1.0' compile 'com.google.code.findbugs:annotations:2.0.3' } diff --git a/sample-dagger/build.gradle b/sample-dagger/build.gradle index 97ee6ed..ef0a49e 100644 --- a/sample-dagger/build.gradle +++ b/sample-dagger/build.gradle @@ -57,8 +57,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:24.0.0' - compile 'com.android.support:design:24.0.0' + compile 'com.android.support:appcompat-v7:24.1.0' + compile 'com.android.support:design:24.1.0' compile 'com.jakewharton:butterknife:7.0.1' compile 'com.google.dagger:dagger:2.2' compile 'com.squareup.retrofit2:retrofit:2.0.2' @@ -73,8 +73,8 @@ dependencies { //Test dependencies - testCompile 'com.android.support:appcompat-v7:24.0.0' - testCompile 'com.android.support:design:24.0.0' + testCompile 'com.android.support:appcompat-v7:24.1.0' + testCompile 'com.android.support:design:24.1.0' testCompile 'junit:junit:4.12' testCompile "org.robolectric:robolectric:3.0" testCompile 'com.android.support.test.espresso:espresso-core:2.2.2' diff --git a/sample-parcelable/build.gradle b/sample-parcelable/build.gradle index 97ee6ed..ef0a49e 100644 --- a/sample-parcelable/build.gradle +++ b/sample-parcelable/build.gradle @@ -57,8 +57,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:24.0.0' - compile 'com.android.support:design:24.0.0' + compile 'com.android.support:appcompat-v7:24.1.0' + compile 'com.android.support:design:24.1.0' compile 'com.jakewharton:butterknife:7.0.1' compile 'com.google.dagger:dagger:2.2' compile 'com.squareup.retrofit2:retrofit:2.0.2' @@ -73,8 +73,8 @@ dependencies { //Test dependencies - testCompile 'com.android.support:appcompat-v7:24.0.0' - testCompile 'com.android.support:design:24.0.0' + testCompile 'com.android.support:appcompat-v7:24.1.0' + testCompile 'com.android.support:design:24.1.0' testCompile 'junit:junit:4.12' testCompile "org.robolectric:robolectric:3.0" testCompile 'com.android.support.test.espresso:espresso-core:2.2.2' diff --git a/sample/build.gradle b/sample/build.gradle index 1bbe5d0..32fd12f 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -57,8 +57,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:24.0.0' - compile 'com.android.support:design:24.0.0' + compile 'com.android.support:appcompat-v7:24.1.0' + compile 'com.android.support:design:24.1.0' compile 'com.jakewharton:butterknife:7.0.1' compile 'com.squareup.retrofit2:retrofit:2.0.2' compile 'com.squareup.retrofit2:converter-gson:2.0.2' @@ -70,8 +70,8 @@ dependencies { //Test dependencies - testCompile 'com.android.support:appcompat-v7:24.0.0' - testCompile 'com.android.support:design:24.0.0' + testCompile 'com.android.support:appcompat-v7:24.1.0' + testCompile 'com.android.support:design:24.1.0' testCompile 'junit:junit:4.12' testCompile "org.robolectric:robolectric:3.0" testCompile 'com.android.support.test.espresso:espresso-core:2.2.2' From be2748487d267e408d0db1fb31fe1762afd92c64 Mon Sep 17 00:00:00 2001 From: Andrzej Chmielewski Date: Wed, 10 Aug 2016 16:00:32 +0200 Subject: [PATCH 3/6] reformatting code --- .../appflate/droidmvp/DroidMVPActivity.java | 24 +++++---- .../appflate/droidmvp/DroidMVPFragment.java | 54 ++++++++----------- .../droidmvp/DroidMVPViewDelegate.java | 5 +- ...rializablePresentationModelSerializer.java | 17 +++--- 4 files changed, 48 insertions(+), 52 deletions(-) diff --git a/library/src/main/java/io/appflate/droidmvp/DroidMVPActivity.java b/library/src/main/java/io/appflate/droidmvp/DroidMVPActivity.java index f8a547f..efb179d 100644 --- a/library/src/main/java/io/appflate/droidmvp/DroidMVPActivity.java +++ b/library/src/main/java/io/appflate/droidmvp/DroidMVPActivity.java @@ -24,15 +24,16 @@ public abstract class DroidMVPActivity> extends AppCompatActivity implements DroidMVPView { - private DroidMVPViewDelegate mvpDelegate = new DroidMVPViewDelegate(createPresentationModelSerializer()) { - @NonNull @Override protected P createPresenter() { - return DroidMVPActivity.this.createPresenter(); - } + private DroidMVPViewDelegate mvpDelegate = + new DroidMVPViewDelegate(createPresentationModelSerializer()) { + @NonNull @Override protected P createPresenter() { + return DroidMVPActivity.this.createPresenter(); + } - @NonNull @Override protected M createPresentationModel() { - return DroidMVPActivity.this.createPresentationModel(); - } - }; + @NonNull @Override protected M createPresentationModel() { + return DroidMVPActivity.this.createPresentationModel(); + } + }; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -65,9 +66,12 @@ public abstract class DroidMVPActivity createPresentationModelSerializer() { return new ParcelableAndSerializablePresentationModelSerializer<>(); diff --git a/library/src/main/java/io/appflate/droidmvp/DroidMVPFragment.java b/library/src/main/java/io/appflate/droidmvp/DroidMVPFragment.java index 28e0859..fb502d9 100644 --- a/library/src/main/java/io/appflate/droidmvp/DroidMVPFragment.java +++ b/library/src/main/java/io/appflate/droidmvp/DroidMVPFragment.java @@ -22,64 +22,58 @@ import android.support.v4.app.Fragment; public abstract class DroidMVPFragment> - extends Fragment implements DroidMVPView { + extends Fragment implements DroidMVPView { - private DroidMVPViewDelegate mvpDelegate = new DroidMVPViewDelegate(createPresentationModelSerializer()) { - @NonNull - @Override - protected P createPresenter() { - return DroidMVPFragment.this.createPresenter(); - } + private DroidMVPViewDelegate mvpDelegate = + new DroidMVPViewDelegate(createPresentationModelSerializer()) { + @NonNull @Override protected P createPresenter() { + return DroidMVPFragment.this.createPresenter(); + } - @NonNull - @Override - protected M createPresentationModel() { - return DroidMVPFragment.this.createPresentationModel(); - } - }; + @NonNull @Override protected M createPresentationModel() { + return DroidMVPFragment.this.createPresentationModel(); + } + }; - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { + @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); performFieldInjection(); mvpDelegate.onCreate(this, savedInstanceState); } - @Override - public void onStart() { + @Override public void onStart() { super.onStart(); mvpDelegate.onStart((V) this); } - @Override - public void onSaveInstanceState(Bundle outState) { + @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); mvpDelegate.onSaveInstanceState(outState); } - @Override - public void onStop() { + @Override public void onStop() { super.onStop(); mvpDelegate.onStop(); } - @Override - public void onDestroy() { + @Override public void onDestroy() { super.onDestroy(); mvpDelegate.onDestroy(); } /** - * Feel free to override this method that returns your own implementation of PresentationModelSerializer. + * Feel free to override this method that returns your own implementation of + * PresentationModelSerializer. * Useful if you use a Parceler library for example - * @return an instance of PresentationModelSerializer that will serialize and deserialize your PresentationModel from Bundle. + * + * @return an instance of PresentationModelSerializer that will serialize and deserialize your + * PresentationModel from Bundle. */ protected PresentationModelSerializer createPresentationModelSerializer() { return new ParcelableAndSerializablePresentationModelSerializer<>(); } - @NonNull - protected P getPresenter() { + @NonNull protected P getPresenter() { return mvpDelegate.getPresenter(); } @@ -96,8 +90,7 @@ protected P getPresenter() { * * @return an instance of your Presenter. */ - @NonNull - protected abstract P createPresenter(); + @NonNull protected abstract P createPresenter(); /** * Used to create the Presentation Model that will be attached to your presenter in #onAttach() @@ -111,6 +104,5 @@ protected P getPresenter() { * * @return Presentation Model instance used by your Presenter. */ - @NonNull - protected abstract M createPresentationModel(); + @NonNull protected abstract M createPresentationModel(); } \ No newline at end of file diff --git a/library/src/main/java/io/appflate/droidmvp/DroidMVPViewDelegate.java b/library/src/main/java/io/appflate/droidmvp/DroidMVPViewDelegate.java index cb34855..5107407 100644 --- a/library/src/main/java/io/appflate/droidmvp/DroidMVPViewDelegate.java +++ b/library/src/main/java/io/appflate/droidmvp/DroidMVPViewDelegate.java @@ -17,11 +17,9 @@ package io.appflate.droidmvp; import android.os.Bundle; -import android.os.Parcelable; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import java.io.Serializable; /** * Class that makes it possible to write your own custom MVP Views that will fit in the DroidMVP @@ -55,7 +53,8 @@ public DroidMVPViewDelegate(@NonNull PresentationModelSerializer serializer) */ public void onCreate(DroidMVPView mvpView, @Nullable Bundle savedInstanceState) { presentationModelKey = mvpView.getClass().getCanonicalName() + "$PresentationModel"; - presentationModel = serializer.restorePresentationModel(savedInstanceState,presentationModelKey); + presentationModel = + serializer.restorePresentationModel(savedInstanceState, presentationModelKey); if (presentationModel == null) { presentationModel = createPresentationModel(); } diff --git a/library/src/main/java/io/appflate/droidmvp/ParcelableAndSerializablePresentationModelSerializer.java b/library/src/main/java/io/appflate/droidmvp/ParcelableAndSerializablePresentationModelSerializer.java index c687d90..585c9e0 100644 --- a/library/src/main/java/io/appflate/droidmvp/ParcelableAndSerializablePresentationModelSerializer.java +++ b/library/src/main/java/io/appflate/droidmvp/ParcelableAndSerializablePresentationModelSerializer.java @@ -2,13 +2,13 @@ import android.os.Bundle; import android.os.Parcelable; - import java.io.Serializable; /** * Created by andrzejchm on 10/08/16. */ -public class ParcelableAndSerializablePresentationModelSerializer implements PresentationModelSerializer { +public class ParcelableAndSerializablePresentationModelSerializer + implements PresentationModelSerializer { public M restorePresentationModel(Bundle savedInstanceState, String presentationModelKey) { if (savedInstanceState != null) { Object potentialPresentationModel = savedInstanceState.get(presentationModelKey); @@ -16,23 +16,24 @@ public M restorePresentationModel(Bundle savedInstanceState, String presentation return (M) potentialPresentationModel; } catch (ClassCastException ex) { throw new IllegalStateException(String.format( - "We expected a presentationModel saved in the bundle under the key: \"%s\", but was: %s", - presentationModelKey, potentialPresentationModel.toString())); + "We expected a presentationModel saved in the bundle under the key: \"%s\", but was: %s", + presentationModelKey, + potentialPresentationModel.toString())); } } return null; } - @Override - public void savePresentationModel(Bundle outState, String presentationModelKey, M presentationModel) { + @Override public void savePresentationModel(Bundle outState, String presentationModelKey, + M presentationModel) { if (presentationModel instanceof Parcelable) { outState.putParcelable(presentationModelKey, (Parcelable) presentationModel); } else if (presentationModel instanceof Serializable) { outState.putSerializable(presentationModelKey, (Serializable) presentationModel); } else { throw new IllegalArgumentException( - "Your presentation model must either implement Parcelable or Serializable interface: " - + presentationModel.getClass().getCanonicalName()); + "Your presentation model must either implement Parcelable or Serializable interface: " + + presentationModel.getClass().getCanonicalName()); } } } From 731684f22ba7486d8137645de151495b9cffb824 Mon Sep 17 00:00:00 2001 From: Andrzej Chmielewski Date: Wed, 10 Aug 2016 16:24:46 +0200 Subject: [PATCH 4/6] add more artifacts to circleCI --- circle.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/circle.yml b/circle.yml index d235d23..8f70ed3 100644 --- a/circle.yml +++ b/circle.yml @@ -22,6 +22,16 @@ test: post: - mkdir -p $CIRCLE_ARTIFACTS/sample/reports - mkdir -p $CIRCLE_ARTIFACTS/sample/test-results + - mkdir -p $CIRCLE_ARTIFACTS/sample-dagger/reports + - mkdir -p $CIRCLE_ARTIFACTS/sample-dagger/test-results + - mkdir -p $CIRCLE_ARTIFACTS/library/reports + - mkdir -p $CIRCLE_ARTIFACTS/library/test-results - cp -r sample/build/test-results/ $CIRCLE_ARTIFACTS/sample/test-results - cp -r sample/build/reports/ $CIRCLE_ARTIFACTS/sample/reports - cp -r sample/build/outputs/ $CIRCLE_ARTIFACTS/sample/outputs + - cp -r sample-dagger/build/test-results/ $CIRCLE_ARTIFACTS/sample-dagger/test-results + - cp -r sample-dagger/build/reports/ $CIRCLE_ARTIFACTS/sample-dagger/reports + - cp -r sample-dagger/build/outputs/ $CIRCLE_ARTIFACTS/sample-dagger/outputs + - cp -r library/build/test-results/ $CIRCLE_ARTIFACTS/library/test-results + - cp -r library/build/reports/ $CIRCLE_ARTIFACTS/library/reports + - cp -r library/build/outputs/ $CIRCLE_ARTIFACTS/library/outputs From 73a58014e30698a1e0fee64912f2251c6ac0eac1 Mon Sep 17 00:00:00 2001 From: Andrzej Chmielewski Date: Wed, 10 Aug 2016 16:36:35 +0200 Subject: [PATCH 5/6] bump to 24.1.1 version --- library/build.gradle | 2 +- sample-dagger/build.gradle | 8 ++++---- sample-parcelable/build.gradle | 8 ++++---- sample/build.gradle | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/library/build.gradle b/library/build.gradle index ae786a3..16fe6bc 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -46,6 +46,6 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:24.1.0' + compile 'com.android.support:appcompat-v7:24.1.1' compile 'com.google.code.findbugs:annotations:2.0.3' } diff --git a/sample-dagger/build.gradle b/sample-dagger/build.gradle index ef0a49e..5917fcb 100644 --- a/sample-dagger/build.gradle +++ b/sample-dagger/build.gradle @@ -57,8 +57,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:24.1.0' - compile 'com.android.support:design:24.1.0' + compile 'com.android.support:appcompat-v7:24.1.1' + compile 'com.android.support:design:24.1.1' compile 'com.jakewharton:butterknife:7.0.1' compile 'com.google.dagger:dagger:2.2' compile 'com.squareup.retrofit2:retrofit:2.0.2' @@ -73,8 +73,8 @@ dependencies { //Test dependencies - testCompile 'com.android.support:appcompat-v7:24.1.0' - testCompile 'com.android.support:design:24.1.0' + testCompile 'com.android.support:appcompat-v7:24.1.1' + testCompile 'com.android.support:design:24.1.1' testCompile 'junit:junit:4.12' testCompile "org.robolectric:robolectric:3.0" testCompile 'com.android.support.test.espresso:espresso-core:2.2.2' diff --git a/sample-parcelable/build.gradle b/sample-parcelable/build.gradle index ef0a49e..5917fcb 100644 --- a/sample-parcelable/build.gradle +++ b/sample-parcelable/build.gradle @@ -57,8 +57,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:24.1.0' - compile 'com.android.support:design:24.1.0' + compile 'com.android.support:appcompat-v7:24.1.1' + compile 'com.android.support:design:24.1.1' compile 'com.jakewharton:butterknife:7.0.1' compile 'com.google.dagger:dagger:2.2' compile 'com.squareup.retrofit2:retrofit:2.0.2' @@ -73,8 +73,8 @@ dependencies { //Test dependencies - testCompile 'com.android.support:appcompat-v7:24.1.0' - testCompile 'com.android.support:design:24.1.0' + testCompile 'com.android.support:appcompat-v7:24.1.1' + testCompile 'com.android.support:design:24.1.1' testCompile 'junit:junit:4.12' testCompile "org.robolectric:robolectric:3.0" testCompile 'com.android.support.test.espresso:espresso-core:2.2.2' diff --git a/sample/build.gradle b/sample/build.gradle index 32fd12f..4ae2f02 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -57,8 +57,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:24.1.0' - compile 'com.android.support:design:24.1.0' + compile 'com.android.support:appcompat-v7:24.1.1' + compile 'com.android.support:design:24.1.1' compile 'com.jakewharton:butterknife:7.0.1' compile 'com.squareup.retrofit2:retrofit:2.0.2' compile 'com.squareup.retrofit2:converter-gson:2.0.2' @@ -70,8 +70,8 @@ dependencies { //Test dependencies - testCompile 'com.android.support:appcompat-v7:24.1.0' - testCompile 'com.android.support:design:24.1.0' + testCompile 'com.android.support:appcompat-v7:24.1.1' + testCompile 'com.android.support:design:24.1.1' testCompile 'junit:junit:4.12' testCompile "org.robolectric:robolectric:3.0" testCompile 'com.android.support.test.espresso:espresso-core:2.2.2' From 244bcea9ca59f7b70332fb80fb6b58f64ddc2080 Mon Sep 17 00:00:00 2001 From: Andrzej Chmielewski Date: Wed, 10 Aug 2016 16:39:51 +0200 Subject: [PATCH 6/6] bump version to 0.1.3 --- README.md | 2 +- library/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a048d0c..64ef561 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add it in your root `build.gradle` at the end of repositories: Add the dependency to your app's `build.gradle` ```groovy dependencies { - compile 'com.github.andrzejchm:DroidMVP:0.1.2' + compile 'com.github.andrzejchm:DroidMVP:0.1.3' } ``` diff --git a/library/build.gradle b/library/build.gradle index 16fe6bc..707c353 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -27,7 +27,7 @@ android { minSdkVersion 10 targetSdkVersion 24 versionCode 1 - versionName "0.1.2" + versionName "0.1.3" } buildTypes { release {