Implements nullability annotations for generated getters and setters. @Nonnull is used for both getters and setters if either of the following are true:
The field is a table model field (i.e. column) with a @NotNull annotation (i.e. a NOT NULL SQL constraint)
The field is a view model field annotated with @Nonnull or @NotNull (we can't infer nullability for view fields right now so this allows users to specify them manually)
If the accessor uses a primitive, no annotation is used (obviously). Otherwise, @Nullable is used for both getter and setter.
This PR also enhances the previous constraint annotations PR by allowing the javax @Nonnull to be used in table model specs to specify a NOT NULL constraint, although it logs a warning to alert the user that they should use the squidb @NotNull for this purpose instead.
Finally, this change includes misc other build updates, including re-enabling more emulator test on travis (by manually updating to the latest SDK tools in the build scripts) (emulators are still flaky, sigh) and bumping versions for the latest Android Studio release.
Implements nullability annotations for generated getters and setters.
@Nonnull
is used for both getters and setters if either of the following are true:@NotNull
annotation (i.e. aNOT NULL
SQL constraint)@Nonnull
or@NotNull
(we can't infer nullability for view fields right now so this allows users to specify them manually)If the accessor uses a primitive, no annotation is used (obviously). Otherwise,
@Nullable
is used for both getter and setter.This PR also enhances the previous constraint annotations PR by allowing the javax
@Nonnull
to be used in table model specs to specify aNOT NULL
constraint, although it logs a warning to alert the user that they should use the squidb@NotNull
for this purpose instead.Finally, this change includes misc other build updates, including
re-enabling more emulator test on travis (by manually updating to the latest SDK tools in the build scripts)(emulators are still flaky, sigh) and bumping versions for the latest Android Studio release.