- Next major release
- Nullability in Fragment Builder: Non Optional arguments must not be null. Corresponding @Nullable annotations are applied.
- Support for
anroidx.Fragment
#103 - Some minor improvements:
- Hotfix (#47): There was a bug that Builder has not been generated when Fragment have no (zero) arguments
- Minor Bugfix (#35): when using custom
Bundler
and setter methods (because annotated field is private) java compiler could not determine the generic type of setter method parameter.
3.0.0 (2015-11-02): See this blog post for more information
- You now have to annotate the Fragment class itself with
@FragmentWithArgs
. For backward compatibility reasons this is not mandatory. However it's strongly recommended because in further versions of FragmentArgs this could become mandatory to support more features. - Deprecated
@FragmentArgsInherited
. Use@FragmentWithArgs(inherited = true or false)
instead. - Support for setter methods: Still annotate your fields with
@Arg
not the setter method. Now you can annotateprivate
fields as well, but you have to provide the corresponding setter method. - Kotlin support: Since setter methods are now supported, FragmentArgs support kotlin backing fields out of the box.
- Generated Builder classes are now per default annotated with
@NonNull
from androids support annotation library. Furthermore, this adds even better kotlin support since kotlin uses this annotations for null safety. You can disable this option by using annotation processor optionfragmentArgsSupportAnnotations false
. See readme for detail information. - You can use annotation processor option
fragmentArgsBuilderAnnotations "com.example.MyAnnotation"
to annotate the generated builder classes with additional third party annotations. See readme for details information.
- Added
ArgsBundler
to provide a plugin mechanism for not out of the box supported data types. Two ArgsBundler are already providedCastedArrayListArgsBundler
andPacelerArgsBundler
. - Removed warning: "Could not load the generated automapping class. However, that may be ok, if you use FragmentArgs in library projects".
- Better error messages if annotating
@Arg
on unsupported type fields.
- Removed the compilation warning:
Warning: The following options were not recognized by any processor: '[fragmentArgsLib]'
- Minor bugfix that have occurred on some java 6 enviroments in combination with
@FragmentArgsInherited
- Support for inheritance through included modules, jar and aar
- Introduced
@FragmentArgsInherited
annotation
Better support for inheritance and abstract classes
Support for Android libraries to avoid errors where the auto injector class is generated multiple times which will cause this error
Multiple dex files define com/hannesdorfmann/fragmentargs/AutoFragmentArgInjector
optimization
Minor bug fix
Annotation Processor: support for Java 7 and Java 8
First major release