You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ka...@apache.org on 2014/05/01 20:32:19 UTC

[34/53] [abbrv] Split out cordova-lib: move cordova-plugman files

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/src/ios/EPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js b/cordova-lib/spec-plugman/plugins/dependencies/meta/subdir/E/www/plugin-e.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
new file mode 100644
index 0000000..57d96d9
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/plugin.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="E"
+    version="0.6.0">
+
+    <name>Plugin E</name>
+
+    <asset src="www/plugin-e.js" target="plugin-e.js" />
+
+    <config-file target="config.xml" parent="/*">
+        <access origin="build.phonegap.com" />
+    </config-file>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="plugins">
+            <plugin name="E"
+                value="com.phonegap.E.E"/>
+        </config-file>
+
+        <source-file src="src/android/E.java"
+                target-dir="src/com/phonegap/E" />
+    </platform>
+
+        
+    <!-- ios -->
+    <platform name="ios">
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="plugins">
+            <plugin name="E"
+                value="EPluginCommand"/>
+        </config-file>
+
+        <header-file src="src/ios/EPluginCommand.h" />
+        <source-file src="src/ios/EPluginCommand.m"/>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/android/E.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.h
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/src/ios/EPluginCommand.m
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js b/cordova-lib/spec-plugman/plugins/dependencies/subdir/E/www/plugin-e.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml b/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
new file mode 100644
index 0000000..fd10a04
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/multiple-children/plugin.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.pushwoosh.plugins.pushwoosh"
+    version="3.0.0">
+
+    <name>Pushwoosh</name>
+
+    <!-- android -->
+    <platform name="android">
+		<config-file target="AndroidManifest.xml" parent="/manifest">
+			<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+			
+			<!--library-->
+			<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+			
+			<!-- GCM connects to Google Services. -->
+			<uses-permission android:name="android.permission.INTERNET"/>
+			
+			<!-- GCM requires a Google account. -->
+			<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
+			
+			<!-- Keeps the processor from sleeping when a message is received. -->
+			<uses-permission android:name="android.permission.WAKE_LOCK"/>
+			
+			<!--
+			 Creates a custom permission so only this app can receive its messages.
+			 
+			 NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
+			 where PACKAGE is the application's package name.
+			 -->
+			<permission
+			android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"
+			android:protectionLevel="signature"/>
+			<uses-permission
+			android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"/>
+			
+			<!-- This app has permission to register and receive data message. -->
+			<uses-permission
+			android:name="com.google.android.c2dm.permission.RECEIVE"/>
+		</config-file>
+		
+		<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
+			<intent-filter>
+				<action android:name="$PACKAGE_NAME.MESSAGE"/>
+				<category android:name="android.intent.category.DEFAULT"/>
+			</intent-filter>
+		</config-file>
+
+		<config-file target="AndroidManifest.xml" parent="/manifest/application">
+			<activity android:name="com.arellomobile.android.push.PushWebview"/>
+			
+			<activity android:name="com.arellomobile.android.push.MessageActivity"/>
+			
+			<activity android:name="com.arellomobile.android.push.PushHandlerActivity"/>
+			
+			<!--
+			 BroadcastReceiver that will receive intents from GCM
+			 services and handle them to the custom IntentService.
+			 
+			 The com.google.android.c2dm.permission.SEND permission is necessary
+			 so only GCM services can send data messages for the app.
+			 -->
+			<receiver
+				android:name="com.google.android.gcm.GCMBroadcastReceiver"
+				android:permission="com.google.android.c2dm.permission.SEND">
+				<intent-filter>
+					<!-- Receives the actual messages. -->
+					<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
+					<!-- Receives the registration id. -->
+					<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
+					<category android:name="$PACKAGE_NAME"/>
+				</intent-filter>
+			</receiver>
+			
+			<!--
+			 Application-specific subclass of PushGCMIntentService that will
+			 handle received messages.
+			 -->
+			<service android:name="com.arellomobile.android.push.PushGCMIntentService"/>        					
+			
+		</config-file>
+		
+		<config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="PushNotification"
+			value="com.pushwoosh.test.plugin.pushnotifications.PushNotifications" onload="true"/>
+        </config-file>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml b/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
new file mode 100644
index 0000000..6c17476
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/shared-deps-multi-child/plugin.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="ca.filmaj.shareddeps"
+    version="1.0.0">
+
+    <name>Sharing Dependencies with the Multi-Child Plugin, woo</name>
+
+    <!-- android -->
+    <platform name="android">
+		<config-file target="AndroidManifest.xml" parent="/manifest">
+			<uses-permission android:name="android.permission.INTERNET"/>
+		</config-file>
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/prepare.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/prepare.spec.js b/cordova-lib/spec-plugman/prepare.spec.js
new file mode 100644
index 0000000..6adaf9a
--- /dev/null
+++ b/cordova-lib/spec-plugman/prepare.spec.js
@@ -0,0 +1,59 @@
+var platforms = require('../src/platforms'),
+    prepare = require('../src/prepare'),
+    common  = require('../src/platforms/common');
+    fs      = require('fs'),
+    os      = require('osenv'),
+    path    = require('path'),
+    shell   = require('shelljs'),
+    config_changes = require('../src/util/config-changes'),
+    temp    = __dirname,
+    plugins_dir = path.join(temp, 'plugins');
+
+var json = path.join(temp, 'assets', 'www', 'cordova_plugins.json');
+var js = path.join(temp, 'assets', 'www', 'cordova_plugins.js');
+
+describe('prepare', function() {
+    var proc, platform_json, write, mkdir, rm;
+    beforeEach(function() {
+        rm = spyOn(shell, 'rm');
+        mkdir = spyOn(shell, 'mkdir');
+        proc = spyOn(config_changes, 'process');
+        platform_json = spyOn(config_changes, 'get_platform_json').andReturn({installed_plugins:{},dependent_plugins:{},prepare_queue:{uninstalled:[]}});
+        write = spyOn(fs, 'writeFileSync');
+    });
+    it('should create cordova_plugins.js file in a custom www directory', function() {
+        var custom_www = path.join(temp, 'assets', 'custom_www'),
+            js = path.join(temp, 'assets', 'custom_www', 'cordova_plugins.js');
+        prepare(temp, 'android', plugins_dir, custom_www);
+        expect(write).toHaveBeenCalledWith(js, jasmine.any(String), 'utf-8');
+    });
+    describe('handling of js-modules', function() {
+        var copySpy;
+        beforeEach(function() {
+            copySpy = spyOn(common, 'copyFile');
+            platform_json.andReturn({
+                installed_plugins: {plugin_one: '', plugin_two: ''},
+                dependent_plugins: {}, prepare_queue: {uninstalled:[]}
+            });
+        });
+        describe('uninstallation/removal', function() {
+            var existsSync;
+            beforeEach(function() {
+                existsSync = spyOn(fs, 'existsSync').andReturn(true);
+                platform_json.andReturn({installed_plugins:{},dependent_plugins:{},prepare_queue:{uninstalled:[{
+                    plugin:'nickelback',
+                    id:'nickelback',
+                    topLevel:true
+                }]}});
+            });
+            it('should remove any www/plugins directories related to plugins being queued for removal', function() {
+                prepare(temp, 'android', plugins_dir);
+                expect(rm).toHaveBeenCalledWith('-rf', path.join(temp, 'assets', 'www', 'plugins', 'nickelback'));
+            });
+        });
+    });
+    it('should call into config-changes\' process method to do config processing', function() {
+        prepare(temp, 'android', plugins_dir);
+        expect(proc).toHaveBeenCalledWith(plugins_dir, temp, 'android');
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/projects/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/.gitkeep b/cordova-lib/spec-plugman/projects/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
new file mode 100644
index 0000000..b5fea9d
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_install/AndroidManifest.xml
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='utf-8'?>
+<manifest android:versionCode="5" android:versionName="1.1" android:windowSoftInputMode="adjustPan" package="cordova.test.uninstall" xmlns:android="http://schemas.android.com/apk/res/android">
+    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
+    <application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name">
+        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="ChildApp">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" android:name="com.phonegap.DroidGap">
+            <intent-filter>
+            </intent-filter>
+        </activity>
+        <activity android:label="@string/app_name" android:name="com.phonegap.plugins.dummyplugin.DummyPlugin">
+            <intent-filter />
+        </activity>
+    </application>
+    <uses-sdk android:minSdkVersion="5" />
+</manifest>

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version b/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
new file mode 100644
index 0000000..0ab155c
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_install/cordova/android_sdk_version
@@ -0,0 +1 @@
+echo 18.0.9
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_install/cordova/version
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/version b/cordova-lib/spec-plugman/projects/android_install/cordova/version
new file mode 100644
index 0000000..01f68fd
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_install/cordova/version
@@ -0,0 +1 @@
+echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat b/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
new file mode 100644
index 0000000..c637d7c
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_install/cordova/version.bat
@@ -0,0 +1,2 @@
+@ECHO OFF
+echo 9.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml b/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
new file mode 100644
index 0000000..0979b02
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android_one/AndroidManifest.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
+      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
+    <supports-screens
+    	android:largeScreens="true"
+    	android:normalScreens="true"
+    	android:smallScreens="true"
+    	android:xlargeScreens="true"
+    	android:resizeable="true"
+    	android:anyDensity="true"
+    	/>
+
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.RECEIVE_SMS" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+    <uses-permission android:name="android.permission.READ_CONTACTS" />
+    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
+
+    <uses-feature android:name="android.hardware.camera" />
+    <uses-feature android:name="android.hardware.camera.autofocus" />
+    
+    <appid value="$APP_ID" />
+
+    <application android:icon="@drawable/icon" android:label="@string/app_name"
+    	android:debuggable="true">
+		<activity android:name="ChildApp" android:label="@string/app_name" 
+				  android:configChanges="orientation|keyboardHidden">
+			<intent-filter>
+				<action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+			</intent-filter>
+        </activity>
+        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
+            	  android:configChanges="orientation|keyboardHidden">
+        	<intent-filter>
+        	</intent-filter>
+        </activity>
+    </application>
+
+	<uses-sdk android:minSdkVersion="5" />
+</manifest> 

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0318d8cd/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep b/cordova-lib/spec-plugman/projects/android_one/assets/www/.gitkeep
new file mode 100644
index 0000000..e69de29