summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-06-17 13:23:33 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-06-17 13:23:33 -0400
commit4a8630ad458982f754bf181a66a29c5ba0285315 (patch)
tree1ca8160b53f266ead62681e8bb18520a05af31d7 /plugins
parent6b75cb2adfb7e858291c985428c47f28d3f1e52a (diff)
updated versions of platforms
Diffstat (limited to 'plugins')
-rw-r--r--plugins/android.json38
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/PlatformScriptsWorkflow.md30
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/README.md92
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/package.json2
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/plugin.xml4
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java11
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/xwalk.gradle93
-rw-r--r--plugins/cordova-plugin-whitelist/README.md4
-rw-r--r--plugins/cordova-plugin-whitelist/package.json2
-rw-r--r--plugins/cordova-plugin-whitelist/plugin.xml2
-rw-r--r--plugins/fetch.json25
-rw-r--r--plugins/ios.json3
12 files changed, 204 insertions, 102 deletions
diff --git a/plugins/android.json b/plugins/android.json
index d519f004..bf8a19f9 100644
--- a/plugins/android.json
+++ b/plugins/android.json
@@ -13,27 +13,27 @@
"count": 1
},
{
- "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>",
+ "xml": "<preference name=\"webView\" value=\"org.crosswalk.engine.XWalkWebViewEngine\" />",
"count": 1
},
{
- "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>",
+ "xml": "<feature name=\"InAppBrowser\"><param name=\"android-package\" value=\"org.apache.cordova.inappbrowser.InAppBrowser\" /></feature>",
"count": 1
},
{
- "xml": "<feature name=\"SplashScreen\"><param name=\"android-package\" value=\"org.apache.cordova.splashscreen.SplashScreen\" /><param name=\"onload\" value=\"true\" /></feature>",
+ "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>",
"count": 1
},
{
- "xml": "<feature name=\"StatusBar\"><param name=\"android-package\" value=\"org.apache.cordova.statusbar.StatusBar\" /><param name=\"onload\" value=\"true\" /></feature>",
+ "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>",
"count": 1
},
{
- "xml": "<preference name=\"webView\" value=\"org.crosswalk.engine.XWalkWebViewEngine\" />",
+ "xml": "<feature name=\"SplashScreen\"><param name=\"android-package\" value=\"org.apache.cordova.splashscreen.SplashScreen\" /><param name=\"onload\" value=\"true\" /></feature>",
"count": 1
},
{
- "xml": "<feature name=\"InAppBrowser\"><param name=\"android-package\" value=\"org.apache.cordova.inappbrowser.InAppBrowser\" /></feature>",
+ "xml": "<feature name=\"StatusBar\"><param name=\"android-package\" value=\"org.apache.cordova.statusbar.StatusBar\" /><param name=\"onload\" value=\"true\" /></feature>",
"count": 1
}
]
@@ -43,29 +43,29 @@
},
"installed_plugins": {
"com.ionic.keyboard": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
+ },
+ "cordova-plugin-crosswalk-webview": {
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
+ },
+ "cordova-plugin-inappbrowser": {
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
},
"cordova-plugin-whitelist": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
},
"org.apache.cordova.console": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
},
"org.apache.cordova.device": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
},
"org.apache.cordova.splashscreen": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
},
"org.apache.cordova.statusbar": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
- },
- "cordova-plugin-crosswalk-webview": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
- },
- "cordova-plugin-inappbrowser": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
}
},
"dependent_plugins": {}
-} \ No newline at end of file
+}
diff --git a/plugins/cordova-plugin-crosswalk-webview/PlatformScriptsWorkflow.md b/plugins/cordova-plugin-crosswalk-webview/PlatformScriptsWorkflow.md
new file mode 100644
index 00000000..aa31dcd0
--- /dev/null
+++ b/plugins/cordova-plugin-crosswalk-webview/PlatformScriptsWorkflow.md
@@ -0,0 +1,30 @@
+### Directions for Non-CLI Android-Only cordova project
+
+* Pull down the Cordova Android
+```
+$ git clone https://github.com/apache/cordova-android.git
+```
+* Generate a project, e.g creating HelloWorld
+```
+$ /path/to/cordova-android/bin/create hello com.example.hello HelloWorld
+```
+* Navigate to the project folder
+```
+$ cd hello
+```
+* Install Crosswalk engine plugin by plugman (version >= 0.22.17)
+```
+$ plugman install --platform android --plugin https://github.com/MobileChromeApps/cordova-crosswalk-engine.git --project .
+```
+* Build
+```
+$ ./cordova/build
+```
+The build script will automatically fetch the Crosswalk WebView libraries from Crosswalk project download site (https://download.01.org/crosswalk/releases/crosswalk/android/) and build for both X86 and ARM architectures.
+
+For example, building HelloWorld generates:
+
+```
+/path/to/hello/build/outputs/apk/hello-x86-debug.apk
+/path/to/hello/build/outputs/apk/hello-armv7-debug.apk
+```
diff --git a/plugins/cordova-plugin-crosswalk-webview/README.md b/plugins/cordova-plugin-crosswalk-webview/README.md
index c2b25f57..cb5d8f9a 100644
--- a/plugins/cordova-plugin-crosswalk-webview/README.md
+++ b/plugins/cordova-plugin-crosswalk-webview/README.md
@@ -1,69 +1,24 @@
+# cordova-plugin-crosswalk-webview
+Makes your Cordova application use the [Crosswalk WebView](https://crosswalk-project.org/)
+instead of the System WebView. Requires cordova-android 4.0 or greater.
-Apache Cordova Crosswalk Engine
-===
+### Install
-Cordova Crosswalk Engine is a [Crosswalk WebView](https://crosswalk-project.org/) based engine to work with [Apache Cordova](http://cordova.apache.org/) for Android. This currently works with master branch of [Cordova Android](https://github.com/apache/cordova-android) on GitHub, and it will work with Apache Cordova Android 4.0.0 release.
+The following directions are for cordova-cli (most people). Alternatively you can use the [Android platform scripts workflow](PlatformScriptsWorkflow.md).
-### Directions:
-#### Android-only:
-* Pull down the Cordova Android
-```
-$ git clone https://github.com/apache/cordova-android.git
-```
-* Generate a project, e.g creating HelloWorld
-```
-$ /path/to/cordova-android/bin/create hello com.example.hello HelloWorld
-```
-* Navigate to the project folder
-```
-$ cd hello
-```
-* Install Crosswalk engine plugin by plugman (version >= 0.22.17)
-```
-$ plugman install --platform android --plugin https://github.com/MobileChromeApps/cordova-crosswalk-engine.git --project .
-```
-* Build
-```
-$ ./cordova/build
-```
-The build script will automatically fetch the Crosswalk WebView libraries from Crosswalk project download site (https://download.01.org/crosswalk/releases/crosswalk/android/) and build for both X86 and ARM architectures.
-
-For example, building HelloWorld generates:
+* Open an existing cordova project, with cordova-android 4.0.0+, and using the latest CLI.
+* Add this plugin
```
-/path/to/hello/build/outputs/apk/hello-x86-debug.apk
-/path/to/hello/build/outputs/apk/hello-armv7-debug.apk
+$ cordova plugin add cordova-plugin-crosswalk-webview
```
-#### Cordova CLI:
-(It will be updated after cordova-android 4.0.0 release with CLI)
-
-* Install the latest version of the Cordova CLI from npm (version >= 4.2.0)
-```
-$ npm install -g cordova
-```
-* Create a project with cordova create, e.g creating HelloWorld
-```
-$ cordova create hello com.example.hello HelloWorld
-```
-* Navigate to the project folder
-```
-$ cd hello
-```
-* Add the Android platform @4.0.0-dev
-```
-$ cordova platform add https://github.com/apache/cordova-android.git
-```
-* Add the Crosswalk engine plugin
-```
-$ cordova plugin add https://github.com/MobileChromeApps/cordova-crosswalk-engine.git
-```
* Build
```
$ cordova build android
```
-The build script will automatically fetch the Crosswalk WebView libraries from Crosswalk project download site (https://download.01.org/crosswalk/releases/crosswalk/android/) and build for both X86 and ARM architectures.
+The build script will automatically fetch the Crosswalk WebView libraries from Crosswalk project download site (https://download.01.org/crosswalk/releases/crosswalk/android/maven2/) and build for both X86 and ARM architectures.
For example, building android with Crosswalk generates:
@@ -81,3 +36,32 @@ To build Crosswalk-enabled apks, add this plugin and run:
To build System-webview apk, remove this plugin and run:
$ cordova build --release -- --android-minSdkVersion=21
+
+### Configure
+
+You can try out a different Crosswalk version using a `<preference>` tag within your `config.xml`. Some examples:
+
+ <!-- These are all equivalent -->
+ <preference name="xwalkVersion" value="org.xwalk:xwalk_core_library_beta:13+" />
+ <preference name="xwalkVersion" value="xwalk_core_library_beta:13+" />
+ <preference name="xwalkVersion" value="13+" />
+ <preference name="xwalkVersion" value="13" />
+
+You can set [command-line flags](http://peter.sh/experiments/chromium-command-line-switches/) as well:
+
+ <!-- This is the default -->
+ <preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />
+
+### Release Notes
+
+#### 1.2.0 (April 22, 2015)
+* Made Crosswalk command-line configurable via `<preference name="xwalkCommandLine" value="..." />`
+* Disabled pull-down-to-refresh by default
+
+#### 1.1.0 (April 21, 2015)
+* Based on Crosswalk v13
+* Made Crosswalk version configurable via `<preference name="xwalkVersion" value="..." />`
+
+#### 1.0.0 (Mar 25, 2015)
+* Initial release
+* Based on Crosswalk v11
diff --git a/plugins/cordova-plugin-crosswalk-webview/package.json b/plugins/cordova-plugin-crosswalk-webview/package.json
index e67c6413..0ad32912 100644
--- a/plugins/cordova-plugin-crosswalk-webview/package.json
+++ b/plugins/cordova-plugin-crosswalk-webview/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-crosswalk-webview",
- "version": "1.0.1-dev",
+ "version": "1.2.0",
"description": "Changes the default WebView to CrossWalk",
"cordova": {
"id": "cordova-plugin-crosswalk-webview",
diff --git a/plugins/cordova-plugin-crosswalk-webview/plugin.xml b/plugins/cordova-plugin-crosswalk-webview/plugin.xml
index 8fd3e478..ac5aac07 100644
--- a/plugins/cordova-plugin-crosswalk-webview/plugin.xml
+++ b/plugins/cordova-plugin-crosswalk-webview/plugin.xml
@@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-crosswalk-webview"
- version="1.0.1-dev">
+ version="1.2.0">
<name>Crosswalk WebView Engine</name>
<description>Changes the default WebView to CrossWalk</description>
@@ -28,6 +28,6 @@
<source-file src="src/android/XWalkCordovaView.java" target-dir="src/org/crosswalk/engine" />
<source-file src="src/android/XWalkCordovaCookieManager.java" target-dir="src/org/crosswalk/engine" />
- <framework src="libs/xwalk_core_library" custom="true" />
+ <framework src="src/android/xwalk.gradle" custom="true" type="gradleReference" />
</platform>
</plugin>
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java b/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java
index 7e5a4f1c..9e94edbe 100644
--- a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java
+++ b/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java
@@ -113,17 +113,6 @@ public class XWalkWebViewEngine implements CordovaWebViewEngine {
webView.addJavascriptInterface(exposedJsApi, "_cordovaNative");
}
- // TODO(ningxin): XWalkViewUIClient should provide onScrollChanged callback
- /*
- public void onScrollChanged(int l, int t, int oldl, int oldt)
- {
- super.onScrollChanged(l, t, oldl, oldt);
- //We should post a message that the scroll changed
- ScrollEvent myEvent = new ScrollEvent(l, t, oldl, oldt, this);
- this.postMessage("onScrollChanged", myEvent);
- }
- */
-
@Override
public boolean canGoBack() {
return this.webView.getNavigationHistory().canGoBack();
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/xwalk.gradle b/plugins/cordova-plugin-crosswalk-webview/src/android/xwalk.gradle
new file mode 100644
index 00000000..3c0a23ee
--- /dev/null
+++ b/plugins/cordova-plugin-crosswalk-webview/src/android/xwalk.gradle
@@ -0,0 +1,93 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+*/
+
+def DEFAULT_VERSION = "org.xwalk:xwalk_core_library_beta:13+"
+def DEFAULT_COMMAND_LINE = "--disable-pull-to-refresh-effect"
+
+repositories {
+ maven {
+ url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
+ }
+}
+
+if (cdvBuildMultipleApks == null) {
+ ext.cdvBuildMultipleApks = true
+}
+if (cdvMinSdkVersion == null) {
+ ext.cdvMinSdkVersion = 14
+}
+
+def getConfigPreference(name, defaultValue) {
+ name = name.toLowerCase()
+ def xml = file("res/xml/config.xml").getText()
+ // Disable namespace awareness since Cordova doesn't use them properly
+ def root = new XmlParser(false, false).parseText(xml)
+
+ def ret = defaultValue
+ root.preference.each { it ->
+ def attrName = it.attribute("name")
+ if (attrName && attrName.toLowerCase() == name) {
+ ret = it.attribute("value")
+ }
+ }
+ return ret
+}
+
+// Set defaults before project's build-extras.gradle
+if (!project.hasProperty('xwalkVersion')) {
+ ext.xwalkVersion = getConfigPreference("xwalkversion", DEFAULT_VERSION)
+}
+if (!project.hasProperty('xwalkCommandLine')) {
+ ext.xwalkCommandLine = getConfigPreference("xwalkcommandline", DEFAULT_COMMAND_LINE)
+}
+
+// Apply values after project's build-extras.gradle
+cdvPluginPostBuildExtras.add({
+
+ def xwalkSpec = xwalkVersion
+ if ((xwalkSpec =~ /:/).count == 1) {
+ xwalkSpec = "org.xwalk:${xwalkSpec}"
+ } else if ((xwalkSpec =~ /:/).count == 0) {
+ if (xwalkSpec ==~ /\d+/) {
+ xwalkSpec = "${xwalkSpec}+"
+ }
+ xwalkSpec = "org.xwalk:xwalk_core_library_beta:${xwalkSpec}"
+ }
+
+ dependencies {
+ compile xwalkSpec
+ }
+
+ if (file('assets/xwalk-command-line').exists()) {
+ println('Not writing assets/xwalk-command-line since file already exists.')
+ return
+ }
+ android.applicationVariants.all { variant ->
+ def variantName = variant.name.capitalize()
+ def mergeTask = tasks["merge${variantName}Assets"]
+ def processTask = tasks["process${variantName}Resources"]
+ def outFile = new File (mergeTask.outputDir, "xwalk-command-line")
+ def newTask = project.task("createXwalkCommandLineFile${variantName}") << {
+ mergeTask.outputDir.mkdirs()
+ outFile.write("xwalk ${xwalkCommandLine}\n")
+ }
+ newTask.dependsOn(mergeTask)
+ processTask.dependsOn(newTask)
+ }
+})
diff --git a/plugins/cordova-plugin-whitelist/README.md b/plugins/cordova-plugin-whitelist/README.md
index 77944c31..def10044 100644
--- a/plugins/cordova-plugin-whitelist/README.md
+++ b/plugins/cordova-plugin-whitelist/README.md
@@ -40,7 +40,7 @@ other URLs, you must add `<allow-navigation>` tags to your `config.xml`:
<!-- Wildcards are allowed for the protocol, as a prefix
to the host, or as a suffix to the path -->
- <allow-navigation href="*://*.example.com/*" />
+ <allow-havigation href="*://*.example.com/*" />
<!-- A wildcard can be used to whitelist the entire network,
over HTTP and HTTPS.
@@ -135,7 +135,7 @@ Here are some example CSP declarations for your `.html` pages:
<meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
<!-- Enable all requests, inline styles, and eval() -->
- <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src: 'self' 'unsafe-inline' 'unsafe-eval'">
<!-- Allow XHRs via https only -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
diff --git a/plugins/cordova-plugin-whitelist/package.json b/plugins/cordova-plugin-whitelist/package.json
index 3bffcbcc..2c72e256 100644
--- a/plugins/cordova-plugin-whitelist/package.json
+++ b/plugins/cordova-plugin-whitelist/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-whitelist",
- "version": "1.0.1-dev",
+ "version": "1.0.0",
"description": "Cordova Whitelist Plugin",
"cordova": {
"platforms": [
diff --git a/plugins/cordova-plugin-whitelist/plugin.xml b/plugins/cordova-plugin-whitelist/plugin.xml
index 6e6b0e0a..2ec60b3c 100644
--- a/plugins/cordova-plugin-whitelist/plugin.xml
+++ b/plugins/cordova-plugin-whitelist/plugin.xml
@@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-whitelist"
- version="1.0.1-dev">
+ version="1.0.0">
<name>Whitelist</name>
<description>Cordova Network Whitelist Plugin</description>
<license>Apache 2.0</license>
diff --git a/plugins/fetch.json b/plugins/fetch.json
index 52347d9f..079ef67c 100644
--- a/plugins/fetch.json
+++ b/plugins/fetch.json
@@ -37,23 +37,32 @@
},
"cordova-plugin-whitelist": {
"source": {
- "type": "git",
- "url": "https://github.com/apache/cordova-plugin-whitelist.git",
- "subdir": "."
- }
+ "type": "registry",
+ "id": "cordova-plugin-whitelist"
+ },
+ "is_top_level": true,
+ "variables": {}
+ },
+ "cordova-plugin-inappbrowser": {
+ "source": {
+ "type": "registry",
+ "id": "cordova-plugin-inappbrowser"
+ },
+ "is_top_level": true,
+ "variables": {}
},
"cordova-plugin-crosswalk-webview": {
"source": {
- "type": "local",
- "path": "engine/cordova-crosswalk-engine-c0.7.1"
+ "type": "registry",
+ "id": "cordova-plugin-crosswalk-webview"
},
"is_top_level": true,
"variables": {}
},
- "cordova-plugin-inappbrowser": {
+ "cordova-plugin-splashscreen": {
"source": {
"type": "registry",
- "id": "cordova-plugin-inappbrowser"
+ "id": "cordova-plugin-splashscreen"
},
"is_top_level": true,
"variables": {}
diff --git a/plugins/ios.json b/plugins/ios.json
index e2f80cb4..9b27d845 100644
--- a/plugins/ios.json
+++ b/plugins/ios.json
@@ -75,9 +75,6 @@
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "com.ionicframework.zmninja469849"
},
- "cordova-plugin-crosswalk-webview": {
- "PACKAGE_NAME": "com.ionicframework.zmninja469849"
- },
"cordova-plugin-inappbrowser": {
"PACKAGE_NAME": "com.ionicframework.zmninja469849"
}