cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [1/4] git commit: updated xcode dependency to 0.6.1 which supports compiler flags. added compiler flag support to ios plugin installation for <source-file> elements.
Date Wed, 03 Jul 2013 17:19:24 GMT
Updated Branches:
  refs/heads/master bb21db9a9 -> 823f9a82f


updated xcode dependency to 0.6.1 which supports compiler flags. added compiler flag support
to ios plugin installation for <source-file> 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/master
Commit: 7c9e7f80628c30c96535b2dc6b918f22e8b5a245
Parents: bb21db9
Author: Fil Maj <maj.fil@gmail.com>
Authored: Wed Jul 3 09:07:44 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
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
<source-file>');
             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 ) };


Mime
View raw message