Skip to content

Commit a39c996

Browse files
committed
Merge pull request #113 from contentful/fix/update-libraries
Fix/update libraries
2 parents 249f0fc + 307e0ac commit a39c996

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## Version [1.0.1][unreleased] - (in development)
5+
## Version [2.0.1][unreleased] - (in development)
6+
- TBA
7+
8+
## Version [2.0.0] - 2016-04-15
9+
- changed: update cda to 7.0.0
610

711
## Version [1.0.0] - 2016-02-29
812
- NOTE: This release introduces backwards incompatible changes to any existing database schemas, when upgrading make sure to bump the `dbVersion` attribute on your `Space`.
@@ -88,7 +92,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
8892
## Version 0.9.0 - 2015-05-18
8993
Initial release.
9094

91-
[unreleased]: https://github.com/contentful/vault/compare/vault-parent-1.0.0...HEAD
95+
[unreleased]: https://github.com/contentful/vault/compare/vault-parent-2.0.0...HEAD
96+
[2.0.0]: https://github.com/contentful/vault/compare/vault-parent-1.0.0...vault-parent-2.0.0
9297
[1.0.0]: https://github.com/contentful/vault/compare/vault-parent-0.9.14...vault-parent-1.0.0
9398
[0.9.14]: https://github.com/contentful/vault/compare/vault-parent-0.9.13...vault-parent-0.9.14
9499
[0.9.13]: https://github.com/contentful/vault/compare/vault-parent-0.9.12...vault-parent-0.9.13

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ Grab via Maven:
1212
<dependency>
1313
<groupId>com.contentful.vault</groupId>
1414
<artifactId>compiler</artifactId>
15-
<version>1.0.0/version>
15+
<version>2.0.0/version>
1616
</dependency>
1717
<dependency>
1818
<groupId>com.contentful.vault</groupId>
1919
<artifactId>core</artifactId>
20-
<version>1.0.0</version>
20+
<version>2.0.0</version>
2121
</dependency>
2222
```
2323
or Gradle:
2424
```groovy
25-
apt 'com.contentful.vault:compiler:1.0.0'
26-
compile 'com.contentful.vault:core:1.0.0'
25+
apt 'com.contentful.vault:compiler:2.0.0'
26+
compile 'com.contentful.vault:core:2.0.0'
2727
```
2828

2929
Note for Gradle users, make sure to use the [android-apt][apt] Gradle plugin, which lets you configure compile-time only dependencies.

core/src/main/java/com/contentful/vault/SyncRunnable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import com.contentful.java.cda.CDAType;
2929
import com.contentful.java.cda.LocalizedResource;
3030
import com.contentful.java.cda.SynchronizedSpace;
31-
import com.squareup.okhttp.HttpUrl;
31+
import okhttp3.HttpUrl;
3232
import java.io.IOException;
3333
import java.io.Serializable;
3434
import java.util.Collections;

core/src/main/java/com/contentful/vault/Vault.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919
import android.content.Context;
2020
import android.database.sqlite.SQLiteDatabase;
21+
import android.os.Handler;
22+
import android.os.Looper;
23+
2124
import com.contentful.java.cda.CDAClient;
2225
import java.util.HashMap;
2326
import java.util.LinkedHashMap;
@@ -26,7 +29,6 @@
2629
import java.util.concurrent.Executor;
2730
import java.util.concurrent.ExecutorService;
2831
import java.util.concurrent.Executors;
29-
import retrofit.android.MainThreadExecutor;
3032
import rx.Observable;
3133
import rx.subjects.PublishSubject;
3234
import rx.subjects.SerializedSubject;
@@ -44,7 +46,12 @@ public class Vault {
4446
static final ExecutorService EXECUTOR_SYNC = Executors.newSingleThreadExecutor(
4547
new VaultThreadFactory());
4648

47-
static final Executor EXECUTOR_CALLBACK = new MainThreadExecutor();
49+
static final Executor EXECUTOR_CALLBACK = new Executor() {
50+
Handler handler = new Handler(Looper.getMainLooper());
51+
@Override public void execute(Runnable command) {
52+
handler.post(command);
53+
}
54+
};
4855

4956
static final Map<String, CallbackBundle> CALLBACKS = new HashMap<>();
5057

@@ -166,7 +173,9 @@ private static SpaceHelper createSpaceHelper(Class<?> space) {
166173
return (SpaceHelper) clazz.newInstance();
167174
} catch (ClassNotFoundException e) {
168175
throw new RuntimeException("Cannot find generated class for space: " + space.getName(), e);
169-
} catch (IllegalAccessException | InstantiationException e) {
176+
} catch (IllegalAccessException e) {
177+
throw new RuntimeException(e);
178+
} catch (InstantiationException e) {
170179
throw new RuntimeException(e);
171180
}
172181
}

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
<organization>
4242
<name>Contentful, GmbH.</name>
43-
<url>http://contentful.com.com</url>
43+
<url>http://contentful.com</url>
4444
</organization>
4545

4646
<properties>
@@ -49,7 +49,7 @@
4949

5050
<android.platform>17</android.platform>
5151
<android.version>4.1.1.4</android.version>
52-
<cda.version>5.0.1</cda.version>
52+
<cda.version>7.0.0</cda.version>
5353
<commons-codec.version>1.10</commons-codec.version>
5454
<commons-io.version>2.4</commons-io.version>
5555
<commons-lang3.version>3.4</commons-lang3.version>
@@ -200,4 +200,4 @@
200200
</plugins>
201201
</pluginManagement>
202202
</build>
203-
</project>
203+
</project>

0 commit comments

Comments
 (0)