Fixes:
- Crash on read caused by R8 optimization
Improvements:
- Add nullability annotations
Thanks Keita Watanabe, Nabil Mosharraf, Ahmet Türk
Fixes:
- Ignore backup files in getAllKeys
- Fix exception on simultaneous write and destroy
Thanks Alexandre Boucey, Mohamed Wael and other contributors to make this happen!
New API:
Paper.bookOn(path)
to set custom storage location;book.getPath()
orbook.getPath(key)
to get path for content of book or key.
Improvements:
- simultaneous read/write for different keys, up to 97% performance gain per thread.
- name change: use
book.contains(key)
instead of deprecatedbook.exist(key)
Thanks @hiperioncn and @cezar-carneiro for your contribution!
- (!) Fixed crash on data migration when switching lib from 1.x to 2.x
- (!) Fixed possible data loss on failed read attempt.
- Get timestamp of last update using
book.lastModified(key)
; - Set log level for internal Kryo serializer using
Paper.setLogLevel()
orbook.setLogLevel()
; - (!) Fixed exception on read data on Android N+;
Thanks @aaronpoweruser and @fiskurgit for contrib!
- Update internal Kryo serializer to 4.0. The data format is changed, but Paper supports backward data compatibility automatically;
- Now 58% less methods count : 4037;
- Depends on data structure you may experience faster reading but slower writing.
- Save all the things! No more restriction to use classes only having no-arg constructor.
- Custom serializers can be added using
Paper.addSerializer()
. - Kotlin is fully supported now, including saving
data class
es. Saving lambdas is not supported.
- New
Paper.book().getAllKeys()
api - Proguard config for lib itself is included in aar.
- New multi-book API.
- 0.9 API is still supported and marked as deprecated.
- Unsafe possibility to write null values is disabled.
NOTE: Data storage format is unchanged. You can easily use files created within version 0.9.