-
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:esperandrotode.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:' -
@GenerateStringResourcesmoved from package experimental to main annotation package -
@Cachedmoved from package experimental to main annotation package - Define which version of
LruCacheyou 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
UnsafeActionsfrom your Preference interface definitions. The methods of this interface were incorporated into theSharedPreferenceActionsinterface. - change calls to
cleartoclearAll - change calls to
clearDefinedtoclearPreferences -
ofClassdefault was removed. UseofStatementinstead. The replacement for@Default(ofClass = YourClass.class)looks like@Default(ofStatement = "new com.example.YourClass()"))