* Print Gradle version used for Java tests during build
* Allow Java tests to be run from any directory
* Simplify Promise wrapping in Java tests runner
* Minor improvements
Before this, Gradle 4.4 was required to build the Gradle wrapper and
thus run the Java tests. This was because of all the stuff that had to
be configured when running the wrapper task using the build.gradle file.
Now we use a config file that only specifies the required Gradle version
and nothing else to run the wrapper task. This allows tests to be run
with Gradle versions beginning with 2.
This fixes the following issues:
* run_java_unit_tests.js always has exit code of 0 thus never failing
the npm tests.
* "Tests completed successfully" is printed after failing to create the
Gradle wrapper and never running the tests.
* Gradle errors are printed twice