yahoo / squidb

SquiDB is a SQLite database library for Android and iOS
https://github.com/yahoo/squidb/wiki
Apache License 2.0
1.31k stars 132 forks source link

Basic accessor nullability [4.0] #275

Closed sbosley closed 7 years ago

sbosley commented 7 years ago

Implements nullability annotations for generated getters and setters. @Nonnull is used for both getters and setters if either of the following are true:

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.