Commit 7f38b922 authored by jiacheng.mao's avatar jiacheng.mao

徐工app开发分支init

parent 548caf1a
......@@ -111,4 +111,8 @@
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="IdCardPlugin" spec="/Users/jeshi/Documents/徐工/card-plugin-test/IdCardPlugin" />
<engine name="ios" spec="^4.5.5" />
<preference name="xwalkVersion" value="19+" />
<preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />
<preference name="xwalkMode" value="embedded" />
<preference name="xwalkMultipleApk" value="true" />
</widget>
......@@ -5,11 +5,11 @@ module.exports = {
debug: true,
isMobilePlatform: true,
loginPath: '"http://180.104.121.66:8088/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ',
basePath: '"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_UAT&apiName="',
basePath: '"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_DEV&apiName="',
rootPath: '"http://180.104.121.66:8088/r/api"',
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_UAT&apiName=file_view&"',
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_DEV&apiName=file_view&"',
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_DEV&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"3.0.6"'
currentVersion: '"3.5.9"'
}
......@@ -7,9 +7,6 @@
"files": {}
},
"installed_plugins": {
"IdCardPlugin": {
"PACKAGE_NAME": "com.xcmg.app"
},
"com.handmobile.cordovaplugin.hotpatch": {
"PACKAGE_NAME": "com.xcmg.app"
},
......@@ -22,6 +19,9 @@
"cordova-plugin-camera": {
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-crosswalk-webview": {
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-datepicker": {
"PACKAGE_NAME": "com.xcmg.app"
},
......@@ -67,20 +67,15 @@
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "com.xcmg.app"
},
"IdCardPlugin": {
"PACKAGE_NAME": "com.xcmg.app"
},
"ionic-plugin-keyboard": {
"PACKAGE_NAME": "com.xcmg.app"
},
"jpush-phonegap-plugin": {
"APP_KEY": "bef4fd44dcf54b79b8ab27c3",
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-crosswalk-webview": {
"XWALK_VERSION": "22+",
"XWALK_LITEVERSION": "xwalk_core_library_canary:17+",
"XWALK_COMMANDLINE": "--disable-pull-to-refresh-effect",
"XWALK_MODE": "embedded",
"XWALK_MULTIPLEAPK": "true",
"PACKAGE_NAME": "com.xcmg.app"
}
},
"dependent_plugins": {
......
......@@ -109,17 +109,6 @@ You can also set user agent with the preference of xwalkUserAgent.
### Release Notes
#### 2.2.0 (November 4, 2016)
* Uses the latest Crosswalk 22 stable version by default
* Keep compatible for Cordova-android 6.0 with evaluating Javascript bridge
#### 2.1.0 (September 9, 2016)
* Uses the latest Crosswalk 21 stable version by default
#### 2.0.0 (August 17, 2016)
* Uses the latest Crosswalk 20 stable version by default
* Discontinue support for Android 4.0 (ICS) in Crosswalk starting with version 20
#### 1.8.0 (June 30, 2016)
* Uses the latest Crosswalk 19 stable version by default
......
......@@ -25,8 +25,6 @@ module.exports = function(context) {
'platforms', 'android'),
projectConfigurationFile = path.join(context.opts.projectRoot,
'config.xml'),
platformConfigurationFile = path.join(androidPlatformDir,
'res', 'xml', 'config.xml'),
projectManifestFile = path.join(androidPlatformDir,
'AndroidManifest.xml'),
xwalk64bit = "xwalk64bit",
......@@ -34,7 +32,7 @@ module.exports = function(context) {
specificVersion = false;
/** Init */
var CordovaConfig = new ConfigParser(platformConfigurationFile);
var CordovaConfig = new ConfigParser(projectConfigurationFile);
var addPermission = function() {
var projectManifestXmlRoot = XmlHelpers.parseElementtreeSync(projectManifestFile);
......@@ -113,27 +111,29 @@ module.exports = function(context) {
/** Add preference */
this.addPreferences = function() {
// Pick the xwalk variables with the cli preferences
// parseCliPreference();
parseCliPreference();
// Add the permission of writing external storage when using shared mode
if (CordovaConfig.getGlobalPreference('xwalkMode') == 'shared') {
if (xwalkVariables['xwalkMode'] == 'shared') {
addPermission();
} else if (xwalkVariables['xwalkMode'] == 'lite' && specificVersion == false) {
xwalkVariables['xwalkVersion'] = xwalkLiteVersion;
}
// Configure the final value in the config.xml
// var configXmlRoot = XmlHelpers.parseElementtreeSync(projectConfigurationFile);
// var preferenceUpdated = false;
// for (var name in xwalkVariables) {
// var child = configXmlRoot.find('./preference[@name="' + name + '"]');
// if(!child) {
// preferenceUpdated = true;
// child = et.XML('<preference name="' + name + '" value="' + xwalkVariables[name] + '" />');
// XmlHelpers.graftXML(configXmlRoot, [child], '/*');
// }
// }
// if(preferenceUpdated) {
// fs.writeFileSync(projectConfigurationFile, configXmlRoot.write({indent: 4}), 'utf-8');
// }
var configXmlRoot = XmlHelpers.parseElementtreeSync(projectConfigurationFile);
var preferenceUpdated = false;
for (var name in xwalkVariables) {
var child = configXmlRoot.find('./preference[@name="' + name + '"]');
if(!child) {
preferenceUpdated = true;
child = et.XML('<preference name="' + name + '" value="' + xwalkVariables[name] + '" />');
XmlHelpers.graftXML(configXmlRoot, [child], '/*');
}
}
if(preferenceUpdated) {
fs.writeFileSync(projectConfigurationFile, configXmlRoot.write({indent: 4}), 'utf-8');
}
}
/** Remove preference*/
......@@ -143,14 +143,14 @@ module.exports = function(context) {
removePermission();
}
// var configXmlRoot = XmlHelpers.parseElementtreeSync(projectConfigurationFile);
// for (var name in xwalkVariables) {
// var child = configXmlRoot.find('./preference[@name="' + name + '"]');
// if (child) {
// XmlHelpers.pruneXML(configXmlRoot, [child], '/*');
// }
// }
// fs.writeFileSync(projectConfigurationFile, configXmlRoot.write({indent: 4}), 'utf-8');
var configXmlRoot = XmlHelpers.parseElementtreeSync(projectConfigurationFile);
for (var name in xwalkVariables) {
var child = configXmlRoot.find('./preference[@name="' + name + '"]');
if (child) {
XmlHelpers.pruneXML(configXmlRoot, [child], '/*');
}
}
fs.writeFileSync(projectConfigurationFile, configXmlRoot.write({indent: 4}), 'utf-8');
}
var build64bit = function() {
......@@ -189,11 +189,6 @@ module.exports = function(context) {
fs.writeFileSync(projectConfigurationFile, configXmlRoot.write({indent: 4}), 'utf-8');
}
}
console.log("Crosswalk info:");
console.log(" After much discussion and analysis of the market,");
console.log(" we have decided to discontinue support for Android 4.0 (ICS) in Crosswalk starting with version 20,");
console.log(" so the minSdkVersion of Cordova project is configured to 16 by default. \n");
}
xwalkVariables = defaultPreferences();
......
{
"name": "cordova-plugin-crosswalk-webview",
"version": "2.2.0",
"version": "1.8.0",
"description": "Changes the default WebView to CrossWalk",
"cordova": {
"id": "cordova-plugin-crosswalk-webview",
......@@ -21,25 +21,16 @@
"ecosystem:cordova",
"cordova-android"
],
"engines": {
"cordovaDependencies": {
"2.0.0": {
"cordova": ">=5.2.0",
"cordova-android": "4 - 5"
},
"2.1.0": {
"cordova": ">=5.2.0",
"cordova-android": "4 - 5"
},
"2.2.0": {
"cordova": ">=5.2.0",
"cordova-android": ">=6"
},
"3.0.0": {
"cordova": ">100"
}
"engines": [
{
"name": "cordova-android",
"version": ">=4"
},
{
"name": "cordova-plugman",
"version": ">=4.2.0"
}
},
],
"author": "",
"license": "Apache 2.0",
"bugs": {
......
......@@ -3,7 +3,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-crosswalk-webview"
version="2.2.0">
version="1.8.0">
<name>Crosswalk WebView Engine</name>
<description>Changes the default WebView to CrossWalk</description>
......@@ -13,25 +13,19 @@
<issue>https://crosswalk-project.org/jira</issue>
<engines>
<engine name="cordova-android" version=">=6"/>
<engine name="cordova-plugman" version=">=5.2.0"/><!-- needed for gradleReference support -->
<engine name="cordova-android" version=">=4"/>
<engine name="cordova-plugman" version=">=4.2.0"/><!-- needed for gradleReference support -->
</engines>
<!-- android -->
<platform name="android">
<preference name="XWALK_VERSION" default="22+"/>
<preference name="XWALK_LITEVERSION" default="xwalk_core_library_canary:17+"/>
<preference name="XWALK_COMMANDLINE" default="--disable-pull-to-refresh-effect"/>
<preference name="XWALK_MODE" default="embedded" />
<preference name="XWALK_MULTIPLEAPK" default="true" />
<config-file target="res/xml/config.xml" parent="/*">
<preference name="webView" value="org.crosswalk.engine.XWalkWebViewEngine"/>
<preference name="xwalkVersion" value="$XWALK_VERSION"/>
<preference name="xwalkLiteVersion" value="$XWALK_LITEVERSION"/>
<preference name="xwalkCommandLine" value="$XWALK_COMMANDLINE"/>
<preference name="xwalkMode" value="$XWALK_MODE" />
<preference name="xwalkMultipleApk" value="$XWALK_MULTIPLEAPK" />
<preference name="android-minSdkVersion" value="16" />
<preference name="xwalkVersion" default="19+"/>
<preference name="xwalkLiteVersion" default="xwalk_core_library_canary:17+"/>
<preference name="xwalkCommandLine" default="--disable-pull-to-refresh-effect"/>
<preference name="xwalkMode" default="embedded" />
<preference name="xwalkMultipleApk" default="true" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/*">
......@@ -55,10 +49,4 @@
<hook type="after_build" src="hooks/after_build/000-build_64_bit.js"/>
<hook type="before_build" src="hooks/before_build/000-build_64_bit.js"/>
</platform>
<info>
After much discussion and analysis of the market, we have decided to discontinue support for Android 4.0 (ICS) in Crosswalk starting with version 20.
So the minSdkVersion of Cordova project is configured to 16 by default.
</info>
</plugin>
......@@ -176,14 +176,6 @@
"PHOTOLIBRARY_USAGE_DESCRIPTION": " "
}
},
"cordova-plugin-crosswalk-webview": {
"source": {
"type": "registry",
"id": "cordova-plugin-crosswalk-webview@2.2.0"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-file": {
"source": {
"type": "registry",
......@@ -223,5 +215,13 @@
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-crosswalk-webview": {
"source": {
"type": "registry",
"id": "cordova-plugin-crosswalk-webview@1.8.0"
},
"is_top_level": true,
"variables": {}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment