Add a node and npm package.json script for running java unit tests. Include them in the top-level npm test script. Run java unit tests in travis. Small refactor in gradlebuilder to support building gradle wrapper more easily. Don't explicitly build gradlew on appveyor CI as now npm test will do it for you.

This commit is contained in:
filmaj
2017-09-12 11:21:20 -07:00
parent 53210710ba
commit 03144eb160
5 changed files with 65 additions and 10 deletions

View File

@@ -69,13 +69,13 @@ GradleBuilder.prototype.getArgs = function (cmd, opts) {
* This returns a promise
*/
GradleBuilder.prototype.runGradleWrapper = function (gradle_cmd) {
GradleBuilder.prototype.runGradleWrapper = function (gradle_cmd, gradle_file) {
var gradlePath = path.join(this.root, 'gradlew');
var wrapperGradle = path.join(this.root, 'wrapper.gradle');
gradle_file = path.join(this.root, (gradle_file || 'wrapper.gradle'));
if (fs.existsSync(gradlePath)) {
// Literally do nothing, for some reason this works, while !fs.existsSync didn't on Windows
} else {
return superspawn.spawn(gradle_cmd, ['-p', this.root, 'wrapper', '-b', wrapperGradle], { stdio: 'pipe' })
return superspawn.spawn(gradle_cmd, ['-p', this.root, 'wrapper', '-b', gradle_file], { stdio: 'pipe' })
.progress(function (stdio) {
suppressJavaOptionsInfo(stdio);
});