Version bump to 1.4.0-SNAPSHOT.
Rewrite build system to use gradle.
Clean up source for the new generation.