mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
CB-11083: Fixing syncronous file check and future-proofing the JS for Travis
This closes #323
This commit is contained in:
parent
304cbef5ed
commit
6aa4b1b301
@ -73,11 +73,13 @@ GradleBuilder.prototype.prepBuildFiles = function() {
|
||||
var subProjects = propertiesObj.libs;
|
||||
var checkAndCopy = function(subProject, root) {
|
||||
var subProjectGradle = path.join(root, subProject, 'build.gradle');
|
||||
fs.exists(subProject, function(exists) {
|
||||
if (!exists) {
|
||||
// This is the future-proof way of checking if a file exists
|
||||
// This must be synchronous to satisfy a Travis test
|
||||
try {
|
||||
fs.accessSync(subProjectGradle, fs.F_OK);
|
||||
} catch (e) {
|
||||
shell.cp('-f', pluginBuildGradle, subProjectGradle);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
for (var i = 0; i < subProjects.length; ++i) {
|
||||
if (subProjects[i] !== 'CordovaLib') {
|
||||
|
Loading…
Reference in New Issue
Block a user