Convert to Gradle build.
Add app output options; make bundle optional.