-
Notifications
You must be signed in to change notification settings - Fork 14
Migration Guide
jbirtel edited this page Jul 24, 2020
·
5 revisions
- Method naming has changed. The accessors for preferences now use get/set Syntax.
- Either adopt the new naming scheme and change methods to
setPreferenceName
/getPreferenceName
- Alternatively annotate your existing methods with
Get("preferenceName")
or respectivelyPut("preferenceName")
- Change the processor dependency from
de.devland.esperandro:esperandro
tode.devland.esperandro:esperandro-preference-gen
- If you used the feature of generated Key constants add the dependency
annotationProcessor 'de.devland.esperandro:esperandro-keys-gen:<version>'
- If you used the feature of generated string values (aka you used
@GenerateStringResources
) add the dependency `annotationProcessor 'de.devland.esperandro:esperandro-resources-gen:' -
@GenerateStringResources
moved from package experimental to main annotation package -
@Cached
moved from package experimental to main annotation package - Define which version of
LruCache
you want to use for caching. There are options for the one from the framework, the one from the support library and the one from the androidx namespace in the annotation. - Remove the interface
UnsafeActions
from your Preference interface definitions. The methods of this interface were incorporated into theSharedPreferenceActions
interface. - change calls to
clear
toclearAll
- change calls to
clearDefined
toclearPreferences
-
ofClass
default was removed. UseofStatement
instead. The replacement for@Default(ofClass = YourClass.class)
looks like@Default(ofStatement = "new com.example.YourClass()")
)