Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@takuji31 takuji31 released this 01 Sep 08:13
· 4 commits to master since this release

Changes

  • Update Kotlin to 1.1.4-3
  • [koreference-gson] update Gson to 2.8.0
  • [koreference-observable] update RxJava to 2.1.3
  • [koreference][Breaking Changes] Remove transaction feature. Because this feature is not convenient.
  • [koreference][Breaking Changes] Koreference model must extends KoreferenceModel
  • [koreference][Breaking Changes] Swap KorefrerenceProperty type parameters. Because unify other classes.
  • [koreference][Breaking Changes] Must use KoreferencePropertyProvider for collecting property key map when creating KoreferenceProperty
  • [koreference-observable] fix multi-threading crash (third time 😢 )

Migration guide

Remove transaction feature. Because this feature is not convenient.

You must use KoreferenceModel.bulk(KoreferenceModel.() -> Unit).

This method does not support chanching discords.

However, changing discards of SharedPreferences is unnecessary as many people will not use it

Koreference model must extends KoreferenceModel

When you need to accessing SharedPreferences instance, you can use KoreferenceModel.sharedPreferences property.

Swap KorefrerenceProperty type parameters. Because unify other classes.

You must swap KoreferenceProperty<M, P> type parameters to KoreferenceProperty<P, M>.

ex.) SharedPreferences value : String
Model value : User

KoreferenceProperty<User, String> to KoreferenceProperty<String, User>

Must use KoreferencePropertyProvider for collecting property key map when creating KoreferenceProperty

You must create Property delegate provider using KoreferencePropertyProvider.

ex.) https://github.com/takuji31/Koreference/blob/63ff79a7ac6134bc00b8a11cd5b753fae998ffa2/koreference/src/main/java/jp/takuji31/koreference/KoreferenceFunctions.kt#L10-L16