hawk
hawk copied to clipboard
Extract GsonParser into another artifact and provide other parsers such as Jackson etc
Hawk requires Gson to serialize/deserialize the value. There is a way to invert this dependency by using Parser interface but transitively Gson will be added to the final apk. In order to avoid that, both consumer and Hawk should depend on abstraction and concrete implementation should be provided by the consumer.
Hawk.init(context)
.setParser(new GsonParser())
.build();
Like retrofit converter, add a built in converter and some third part converters.