Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 096D910208 for ; Thu, 11 Jul 2013 21:50:02 +0000 (UTC) Received: (qmail 18872 invoked by uid 500); 11 Jul 2013 21:50:01 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 18848 invoked by uid 500); 11 Jul 2013 21:50:01 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 18781 invoked by uid 99); 11 Jul 2013 21:50:01 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 21:50:01 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6B9138940B0; Thu, 11 Jul 2013 21:50:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anis@apache.org To: commits@cordova.apache.org Date: Thu, 11 Jul 2013 21:50:06 -0000 Message-Id: <6288fa819ede44748d74abc17184adf3@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [06/43] git commit: updated xcode dependency to 0.6.1 which supports compiler flags. added compiler flag support to ios plugin installation for elements. updated xcode dependency to 0.6.1 which supports compiler flags. added compiler flag support to ios plugin installation for elements. Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/7c9e7f80 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/7c9e7f80 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/7c9e7f80 Branch: refs/heads/plugman-registry Commit: 7c9e7f80628c30c96535b2dc6b918f22e8b5a245 Parents: bb21db9 Author: Fil Maj Authored: Wed Jul 3 09:07:44 2013 -0700 Committer: Fil Maj Committed: Wed Jul 3 09:07:44 2013 -0700 ---------------------------------------------------------------------- package.json | 2 +- spec/platforms/ios.spec.js | 4 ++-- src/platforms/ios.js | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/7c9e7f80/package.json ---------------------------------------------------------------------- diff --git a/package.json b/package.json index 4433ae8..eb483f4 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "nopt": "1.0.x", "glob": "3.2.x", "elementtree": "0.1.x", - "xcode": "https://github.com/filmaj/node-xcode/tarball/master", + "xcode": "0.6.1", "plist": "0.4.x", "bplist-parser": "0.0.x", "shelljs": "0.1.x", http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/7c9e7f80/spec/platforms/ios.spec.js ---------------------------------------------------------------------- diff --git a/spec/platforms/ios.spec.js b/spec/platforms/ios.spec.js index 7d69338..79a45a2 100644 --- a/spec/platforms/ios.spec.js +++ b/spec/platforms/ios.spec.js @@ -133,13 +133,13 @@ describe('ios project handler', function() { var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined}); var spy = spyOn(proj_files.xcode, 'addSourceFile'); ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files); - expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.m')); + expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'DummyPluginCommand.m'), {}); }); it('should call into xcodeproj\'s addSourceFile appropriately when element has a target-dir', function() { var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] != undefined}); var spy = spyOn(proj_files.xcode, 'addSourceFile'); ios['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files); - expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.m')); + expect(spy).toHaveBeenCalledWith(path.join('Plugins', dummy_id, 'targetDir', 'TargetDirTest.m'), {}); }); it('should cp the file to the right target location when element has no target-dir', function() { var source = copyArray(valid_source).filter(function(s) { return s.attrib['target-dir'] == undefined}); http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/7c9e7f80/src/platforms/ios.js ---------------------------------------------------------------------- diff --git a/src/platforms/ios.js b/src/platforms/ios.js index bc2c704..eea59b3 100644 --- a/src/platforms/ios.js +++ b/src/platforms/ios.js @@ -39,11 +39,12 @@ module.exports = { var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el)); var destFile = path.resolve(targetDir, path.basename(src)); var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true); + var has_flags = source_el.attrib['compiler-flags'] && source_el.attrib['compiler-flags'].length ? true : false ; if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios '); if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists'); var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile)); - project.xcode.addSourceFile(project_ref); + project.xcode.addSourceFile(project_ref, has_flags ? {compilerFlags:source_el.attrib['compiler-flags']} : {}); if (is_framework) { var weak = source_el.attrib['weak']; var opt = { weak: (weak == undefined || weak == null || weak != 'true' ? false : true ) };