Set TERM=dumb on Travis-CI for better Gradle output

Also switches language to Java now that the code is no longer Groovy.
Update to Gradle 1.12 now that IntelliJ supports it.