cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [3/5] android commit: CB-11083 Fix to deal with custom frameworks with their own Gradle configuration
Date Wed, 19 Oct 2016 16:50:02 GMT
CB-11083 Fix to deal with custom frameworks with their own Gradle configuration


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/2f3c71fe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/2f3c71fe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/2f3c71fe

Branch: refs/heads/master
Commit: 2f3c71feaa4befe9c33b6a700502aa6b43a21d54
Parents: 0b710a8
Author: Joe Bowser <bowserj@apache.org>
Authored: Tue Jun 7 16:06:40 2016 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Wed Oct 19 09:49:39 2016 -0700

----------------------------------------------------------------------
 bin/templates/cordova/lib/builders/GradleBuilder.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2f3c71fe/bin/templates/cordova/lib/builders/GradleBuilder.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/builders/GradleBuilder.js b/bin/templates/cordova/lib/builders/GradleBuilder.js
index 8fb5c6b..382a851 100644
--- a/bin/templates/cordova/lib/builders/GradleBuilder.js
+++ b/bin/templates/cordova/lib/builders/GradleBuilder.js
@@ -73,10 +73,16 @@ GradleBuilder.prototype.prepBuildFiles = function() {
     var subProjects = propertiesObj.libs;
     for (var i = 0; i < subProjects.length; ++i) {
         if (subProjects[i] !== 'CordovaLib') {
-            shell.cp('-f', pluginBuildGradle, path.join(this.root, subProjects[i], 'build.gradle'));
+            var subProjectGradle = path.join(this.root, subProjects[i], 'build.gradle');
+            // Only copy the gradle if it doesn't exist for the library
+            fs.exists(subProjectGradle, function(exists) {
+              if (!exists)
+                {
+                  shell.cp('-f', pluginBuildGradle, path.join(this.root, subProjects[i],
'build.gradle'));
+                }
+            });
         }
     }
-
     var name = this.extractRealProjectNameFromManifest();
     //Remove the proj.id/name- prefix from projects: https://issues.apache.org/jira/browse/CB-9149
     var settingsGradlePaths =  subProjects.map(function(p){


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message