Skip to content
jbirtel edited this page Jul 24, 2020 · 5 revisions

Migrate from version 3.x.x to 4.0.x

  • 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 respectively Put("preferenceName")

Migrate from version 2.x.x to 3.0.x

  • Change the processor dependency from de.devland.esperandro:esperandro to de.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 the SharedPreferenceActions interface.
  • change calls to clear to clearAll
  • change calls to clearDefined to clearPreferences
  • ofClass default was removed. Use ofStatement instead. The replacement for @Default(ofClass = YourClass.class) looks like @Default(ofStatement = "new com.example.YourClass()"))
Clone this wiki locally