* Use openjdk instead of oracle jdk
* Don't force Java 8 compatibility in the compiler
* Remove generated annotations from apache thrift classes
* Remove ErrorProne
Version 2.x of the shadow plugin had an initialization bug causing warnings about use of deprecated Gradle features; the workaround was to specify `mainClassName` _prior_ to applying the plugin. Happily, the 4.x release of the plugin fixes the bug.
Instead of `--emit-kotlin`, we're adding a `--lang` option defaulting to Java. Instead of `--use-java-style-names`, we're adding `--name-style` defaulting to, well, "default", but that can also be "java" (or potentially other styles as well).
This change also attempts to infer language if it is unspecified - in this case, if `--kt-file-per-type` is specified, but `--lang` is not, we assume that `--lang=kotlin` was intended.
Fixes#209#209 envisioned a bigger revamp of the CLI, but on further thought we don't need to go to such lengths. Just providing options (instead of boolean flags) for a few params and introducing `--lang` are enough to keep the CLI reasonable.
Linker, Schema, Loader, Program, and friends are herein converted to Kotlin. A few methods that should by rights be internal are left public here due to the fact that Java unit-tests cannot see the internal members, even though they are part of the same "module". We'll hide them again once the ThriftType family is also ported.
ThriftType and descendants are tightly intertwined, and it will be tricky to disentangle them. I'm vaguely hopeful that a sealed-class hierarchy will fall out of the mess, but the way forward is still unclear.
Finally, there are a plethora of @JvmName annotations on properties here, to avoid too many spurious changes in unrelated files. We'll get rid of them all after ThriftType is in kt.
As part of the prep work for implementing Kotlin codegen, we're converting the compiler to Kotlin. This is the first portion to be converted; thrifty-schema is next, in stages.
AutoValue and tbroyer's apt plugin necessitate slightly more involved changes. AutoValue in particular is now two separate artifacts (yay!), so we don't have to include repackaged guava in the runtime classpath anymore. Its builders have changed a bit, but as it turns out our code that used the changed bits was dead code. Baleeted.
I've changed the autovalue-annotations from `compileOnly` to `api` because it turns out that the annotations have class retention, so these annotations are therefore actually part of our API.
This paves the way for Java 9 compatibility, and removes some
implementation details from consumers' compile-time classpaths. This
may break said consumers.
Time for another Very Large Change! Here, finally, is the end of the old hand-rolled parser - and, hopefully, the end of fiddly little bugs around trailing-doc comment parsing.
This change should be nearly transparent to consumers; the only visible difference is in parser error reporting. Previously, we would just throw an exception at the first encountered error. We still throw an exception, but now gather all encountered errors into a message.
This is in anticipation of refactoring error reporting a bit; for now, I'd prefer to keep a stable API.
In the process of implementing this, I upgraded AutoValue and finally got tired of the Gradle plugin we were using - I've replaced it with tbroyer's apt plugin, which is comparatively well-behaved.
Fixes#30.