You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2015/02/18 12:25:00 UTC

cordova-medic git commit: CB-8452 Set apk path for gradle build

Repository: cordova-medic
Updated Branches:
  refs/heads/master d7184d609 -> bf6bcd92e


CB-8452 Set apk path for gradle build

github close #30


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

Branch: refs/heads/master
Commit: bf6bcd92e793a621c696abfc9ea456854a35fc32
Parents: d7184d6
Author: amfowler <am...@optusnet.com.au>
Authored: Wed Feb 11 14:07:09 2015 +1100
Committer: sgrebnov <v-...@microsoft.com>
Committed: Wed Feb 18 14:23:49 2015 +0300

----------------------------------------------------------------------
 src/build/makers/android.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/bf6bcd92/src/build/makers/android.js
----------------------------------------------------------------------
diff --git a/src/build/makers/android.js b/src/build/makers/android.js
index 4ca10db..499ccc6 100644
--- a/src/build/makers/android.js
+++ b/src/build/makers/android.js
@@ -34,8 +34,9 @@ module.exports = function(output, sha, devices, entry_point, couchdb_cfg, callba
      var pkgname= 'MainActivity';
                     // compile
                     log('Compiling.');
-                    var ant = 'cd ' + output + ' && '+path.join('.','cordova','build')+' --debug';
-                    shell.exec(ant, {silent:true,async:true},function(code, compile_output) {
+                    var buildCmd = 'cd ' + output + ' && '+path.join('.','cordova','build')+' --debug';
+                    log('shell exec ' + buildCmd);
+                    shell.exec(buildCmd, {silent:true,async:true},function(code, compile_output) {
                         log('Compile exit:'+code);
                         if (code > 0) {
                             error_writer('android', sha, 'Compilation error', compile_output);
@@ -45,6 +46,11 @@ module.exports = function(output, sha, devices, entry_point, couchdb_cfg, callba
                             if( !fs.existsSync(binary_path)){
                               binary_path=path.join(output, 'ant-build', pkgname+'-debug.apk');
                             }
+                            // gradle apk
+                            if( !fs.existsSync(binary_path)){
+                              binary_path=path.join(output, 'build', 'outputs', 'apk', 'android-debug.apk');
+                            }
+                            log("binary path " + binary_path);
                             var package = 'org.apache.mobilespec';
                             if (devices) {
                                 // already have a specific set of devices to deploy to


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