CB-12524: Workaround for obsolete gradle on integration servers

This commit is contained in:
Joe Bowser 2017-03-13 11:53:59 -07:00
parent 6a77acdbf2
commit a9a28d3e77
3 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@ jdk:
before_install:
- nvm install 6
- node --version
- gradle --version
install:
- npm install
- npm install -g codecov

View File

@ -71,10 +71,11 @@ GradleBuilder.prototype.getArgs = function(cmd, opts) {
GradleBuilder.prototype.runGradleWrapper = function(gradle_cmd) {
var gradlePath = path.join(this.root, 'gradlew');
var wrapperGradle = path.join(this.root, 'wrapper.gradle');
if(fs.existsSync(gradlePath)) {
//Literally do nothing, for some reason this works, while !fs.existsSync didn't on Windows
} else {
return spawn(gradle_cmd, ['-p', this.root, 'wrapper'], {stdio: 'inherit'});
return spawn(gradle_cmd, ['-p', this.root, 'wrapper', '-b', wrapperGradle], {stdio: 'inherit'});
}
};

1
wrapper.gradle Normal file
View File

@ -0,0 +1 @@
//This file is intentionally just a comment