April 3rd, 2019
androidx.annotation:annotation:1.1.0-beta01 is released. The commits included in this version can be found here.
@InspectablePropertyannotation to support the new view inspection APIs added in Android Q. This annotation can be applied to getters on views or other UI elements. Code generation tools may use it to create companion objects that map property names and attribute IDs to property values without the overhead of reflection.
- Breaking change:
@ContentViewhas been changed to a constructor annotation and the
@LayoutResvalue has been removed. Classes wishing to support
@ContentViewannotations should add this annotation to a constructor that takes a
@LayoutRes intparameter. This fixes an issue when using this annotation in library modules. (b/128352521)
March 13th, 2019
androidx.annotation:annotation:1.1.0-alpha02 is released. The full list of commits included
in this version can be found here.
- New API restriction scope:
RestrictTo.Scope.LIBRARY_GROUP_PREFIX. It restricts usage to code within packages whose groups share the same library group prefix up to the last
.(period). For example, because libraries
foo.baz:lib2share the prefix
foo, they can use each other's APIs that are restricted to this scope. Similarly, for
com.foo.prefix and can share APIs restricted to that scope. Library
com.bar.qux:lib3however will not be able to use the restricted API because it only shares the prefix
com.and not all the way until the last
February 25th, 2019
androidx.annotation:annotation 1.0.2 is released.
- Correct the R8/ProGuard rules which are embedded in the jar. These were incorrectly referencing the old
android.support.annotationtypes instead of
androidx.annotation. Note: This would have only had an impact on your builds if you were not using
getDefaultProguardFileas those default rules also included correct rules for both packages. (aosp/891685)
- Add a R8/ProGuard rule which explicitly keeps the @Keep annotation itself. This ensures that ProGuard does not remove the annotation from types prior to actually honoring its semantics. Note: This would have only had an impact on your builds if you were not using
getDefaultProguardFileas those default rules also included correct rules for both packages. (aosp/903818)
January 30, 2019
androidx.annotation:annotation 1.1.0-alpha01 is released.
- Added a
@ContentViewannotation that allows you to indicate which layout XML file should be inflated. This is supported in
1.1.0-alpha04release as an alternative to using
onCreateView(), respectively. (aosp/837619)