Browse Source

Update cordova build

Signed-off-by: Chris Cromer <chris@cromer.cl>
Chris Cromer 3 months ago
parent
commit
a090519a7a
32 changed files with 1105 additions and 437 deletions
  1. 2
    1
      config.xml
  2. 23
    0
      node_modules/cordova-android/RELEASENOTES.md
  3. 1
    1
      node_modules/cordova-android/VERSION
  4. 1
    1
      node_modules/cordova-android/bin/lib/create.js
  5. 1
    1
      node_modules/cordova-android/bin/templates/cordova/Api.js
  6. 1
    32
      node_modules/cordova-android/bin/templates/cordova/lib/AndroidStudio.js
  7. 56
    56
      node_modules/cordova-android/bin/templates/cordova/lib/builders/StudioBuilder.js
  8. 2
    1
      node_modules/cordova-android/bin/templates/cordova/lib/emulator.js
  9. 36
    11
      node_modules/cordova-android/bin/templates/cordova/lib/pluginHandlers.js
  10. 1
    1
      node_modules/cordova-android/bin/templates/cordova/version
  11. 14
    8
      node_modules/cordova-android/bin/templates/project/app/build.gradle
  12. 2
    2
      node_modules/cordova-android/bin/templates/project/assets/www/cordova.js
  13. 0
    11
      node_modules/cordova-android/cordova-js-src/exec.js
  14. 4
    4
      node_modules/cordova-android/framework/build.gradle
  15. 1
    1
      node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebView.java
  16. 1
    0
      node_modules/cordova-android/node_modules/android-versions/.jshintrc
  17. 36
    29
      node_modules/cordova-android/node_modules/android-versions/index.js
  18. 11
    11
      node_modules/cordova-android/node_modules/android-versions/package.json
  19. 28
    28
      node_modules/cordova-android/node_modules/android-versions/tests/index.test.js
  20. 14
    14
      node_modules/cordova-android/package.json
  21. 0
    69
      node_modules/cordova-android/spec/fixtures/android_project/AndroidManifest.xml
  22. 0
    0
      node_modules/cordova-android/spec/fixtures/android_project/assets/www/.gitkeep
  23. 0
    54
      node_modules/cordova-android/spec/fixtures/android_project/res/xml/config.xml
  24. 0
    0
      node_modules/cordova-android/spec/fixtures/android_project/src/.gitkeep
  25. 2
    0
      node_modules/cordova-android/spec/fixtures/android_studio_project/build.gradle
  26. 14
    0
      node_modules/cordova-android/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml
  27. 0
    31
      node_modules/cordova-android/spec/unit/AndroidProject.spec.js
  28. 0
    5
      node_modules/cordova-android/spec/unit/AndroidStudio.spec.js
  29. 161
    53
      node_modules/cordova-android/spec/unit/pluginHandlers/handlers.spec.js
  30. 668
    8
      package-lock.json
  31. 7
    4
      package.json
  32. 18
    0
      plugins/browser.json

+ 2
- 1
config.xml View File

@@ -36,5 +36,6 @@
36 36
         <allow-intent href="itms-apps:*" />
37 37
     </platform>
38 38
     <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
39
-    <engine name="android" spec="^7.1.1" />
39
+    <engine name="android" spec="^7.1.4" />
40
+    <engine name="browser" spec="^5.0.4" />
40 41
 </widget>

+ 23
- 0
node_modules/cordova-android/RELEASENOTES.md View File

@@ -20,6 +20,29 @@
20 20
 -->
21 21
 ## Release Notes for Cordova (Android) ##
22 22
 
23
+### 7.1.4 (Nov 22, 2018)
24
+
25
+* Update android-versions to `1.4.0`, with added support for Android Pie ([#573](https://github.com/apache/cordova-android/pull/573))
26
+* Output current package name if package name can't be validated ([#567](https://github.com/apache/cordova-android/pull/567))
27
+* Resolve issue with plugin `target-dir="*app*"` subdirs ([#572](https://github.com/apache/cordova-android/pull/572))
28
+
29
+### 7.1.3 (Nov 19, 2018)
30
+
31
+* [GH-495](https://github.com/apache/cordova-android/pull/495) Incorrect default sdk version issue fix
32
+* [GH-496](https://github.com/apache/cordova-android/pull/496) update comments in `build.gradle`
33
+* [GH-539](https://github.com/apache/cordova-android/pull/539) Fix dest overwrite, in case of of plugin `source-file` element with `target-dir` that does not need remapping
34
+* [GH-540](https://github.com/apache/cordova-android/issues/540) support plugin `source-file` element with any app `target-dir` value
35
+* [GH-547](https://github.com/apache/cordova-android/issues/547) Compatibility of old plugins with non-Java `source-file` entries (individual files)
36
+* [GH-551](https://github.com/apache/cordova-android/pull/551) add missing cast for cdvMinSdkVersion to `build.gradle`
37
+* [GH-552](https://github.com/apache/cordova-android/issues/552) check for `build-extras.gradle` in the parent app directory
38
+
39
+### 7.1.2 (Nov 08, 2018)
40
+* [CB-14127](https://issues.apache.org/jira/browse/CB-14127): Always put the Google repo above jcenter
41
+* [CB-14165](https://issues.apache.org/jira/browse/CB-14165): Emulator: handle "device still connecting" error (#457)
42
+* [CB-14125](https://issues.apache.org/jira/browse/CB-14125): Increase old plugin compatibility
43
+* [CB-13830](https://issues.apache.org/jira/browse/CB-13830): Add handlers for plugins that use non-Java source files, such as Camera
44
+* [CB-14038](https://issues.apache.org/jira/browse/CB-14038): fix false positive detecting project type
45
+
23 46
 ### 7.1.1 (Jul 11, 2018)
24 47
 * Fix unsafe property access in run.js (#445)
25 48
 * Emit log event instead of logging directly (#452)

+ 1
- 1
node_modules/cordova-android/VERSION View File

@@ -1 +1 @@
1
-7.1.1
1
+7.1.4

+ 1
- 1
node_modules/cordova-android/bin/lib/create.js View File

@@ -194,7 +194,7 @@ function validatePackageName (package_name) {
194 194
     var msg = 'Error validating package name. ';
195 195
 
196 196
     if (!/^[a-zA-Z][a-zA-Z0-9_]+(\.[a-zA-Z][a-zA-Z0-9_]*)+$/.test(package_name)) {
197
-        return Q.reject(new CordovaError(msg + 'Package name must look like: com.company.Name'));
197
+        return Q.reject(new CordovaError(msg + 'Must look like: `com.company.Name`. Currently is: `' + package_name + '`'));
198 198
     }
199 199
 
200 200
     // Class is a reserved word

+ 1
- 1
node_modules/cordova-android/bin/templates/cordova/Api.js View File

@@ -248,7 +248,7 @@ Api.prototype.addPlugin = function (plugin, installOptions) {
248 248
     }).then(function () {
249 249
         if (plugin.getFrameworks(this.platform).length === 0) return;
250 250
         selfEvents.emit('verbose', 'Updating build files since android plugin contained <framework>');
251
-          // This should pick the correct builder, not just get gradle
251
+        // This should pick the correct builder, not just get gradle
252 252
         require('./lib/builders/builders').getBuilder(this.builder).prepBuildFiles();
253 253
     }.bind(this))
254 254
         // CB-11022 Return truthy value to prevent running prepare after

+ 1
- 32
node_modules/cordova-android/bin/templates/cordova/lib/AndroidStudio.js View File

@@ -6,37 +6,6 @@
6 6
 
7 7
 /* jshint esnext: false */
8 8
 
9
-var path = require('path');
10
-var fs = require('fs');
11
-var CordovaError = require('cordova-common').CordovaError;
12
-
13 9
 module.exports.isAndroidStudioProject = function isAndroidStudioProject (root) {
14
-    var eclipseFiles = ['AndroidManifest.xml', 'libs', 'res'];
15
-    var androidStudioFiles = ['app', 'app/src/main'];
16
-
17
-    // assume it is an AS project and not an Eclipse project
18
-    var isEclipse = false;
19
-    var isAS = true;
20
-
21
-    if (!fs.existsSync(root)) {
22
-        throw new CordovaError('AndroidStudio.js:inAndroidStudioProject root does not exist: ' + root);
23
-    }
24
-
25
-    // if any of the following exists, then we are not an ASProj
26
-    eclipseFiles.forEach(function (file) {
27
-        if (fs.existsSync(path.join(root, file))) {
28
-            isEclipse = true;
29
-        }
30
-    });
31
-
32
-    // if it is NOT an eclipse project, check that all required files exist
33
-    if (!isEclipse) {
34
-        androidStudioFiles.forEach(function (file) {
35
-            if (!fs.existsSync(path.join(root, file))) {
36
-                console.log('missing file :: ' + file);
37
-                isAS = false;
38
-            }
39
-        });
40
-    }
41
-    return (!isEclipse && isAS);
10
+    return true;
42 11
 };

+ 56
- 56
node_modules/cordova-android/bin/templates/cordova/lib/builders/StudioBuilder.js View File

@@ -215,28 +215,28 @@ StudioBuilder.prototype.prepBuildFiles = function () {
215 215
 StudioBuilder.prototype.prepEnv = function (opts) {
216 216
     var self = this;
217 217
     return check_reqs.check_gradle()
218
-      .then(function (gradlePath) {
219
-          return self.runGradleWrapper(gradlePath);
220
-      }).then(function () {
221
-          return self.prepBuildFiles();
222
-      }).then(function () {
223
-          // If the gradle distribution URL is set, make sure it points to version we want.
224
-          // If it's not set, do nothing, assuming that we're using a future version of gradle that we don't want to mess with.
225
-          // For some reason, using ^ and $ don't work.  This does the job, though.
226
-          var distributionUrlRegex = /distributionUrl.*zip/;
227
-          var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.1-all.zip';
228
-          var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties');
229
-          shell.chmod('u+w', gradleWrapperPropertiesPath);
230
-          shell.sed('-i', distributionUrlRegex, 'distributionUrl=' + distributionUrl, gradleWrapperPropertiesPath);
231
-
232
-          var propertiesFile = opts.buildType + SIGNING_PROPERTIES;
233
-          var propertiesFilePath = path.join(self.root, propertiesFile);
234
-          if (opts.packageInfo) {
235
-              fs.writeFileSync(propertiesFilePath, TEMPLATE + opts.packageInfo.toProperties());
236
-          } else if (isAutoGenerated(propertiesFilePath)) {
237
-              shell.rm('-f', propertiesFilePath);
238
-          }
239
-      });
218
+        .then(function (gradlePath) {
219
+            return self.runGradleWrapper(gradlePath);
220
+        }).then(function () {
221
+            return self.prepBuildFiles();
222
+        }).then(function () {
223
+            // If the gradle distribution URL is set, make sure it points to version we want.
224
+            // If it's not set, do nothing, assuming that we're using a future version of gradle that we don't want to mess with.
225
+            // For some reason, using ^ and $ don't work.  This does the job, though.
226
+            var distributionUrlRegex = /distributionUrl.*zip/;
227
+            var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.1-all.zip';
228
+            var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties');
229
+            shell.chmod('u+w', gradleWrapperPropertiesPath);
230
+            shell.sed('-i', distributionUrlRegex, 'distributionUrl=' + distributionUrl, gradleWrapperPropertiesPath);
231
+
232
+            var propertiesFile = opts.buildType + SIGNING_PROPERTIES;
233
+            var propertiesFilePath = path.join(self.root, propertiesFile);
234
+            if (opts.packageInfo) {
235
+                fs.writeFileSync(propertiesFilePath, TEMPLATE + opts.packageInfo.toProperties());
236
+            } else if (isAutoGenerated(propertiesFilePath)) {
237
+                shell.rm('-f', propertiesFilePath);
238
+            }
239
+        });
240 240
 };
241 241
 
242 242
 /*
@@ -248,33 +248,33 @@ StudioBuilder.prototype.build = function (opts) {
248 248
     var args = this.getArgs(opts.buildType === 'debug' ? 'debug' : 'release', opts);
249 249
 
250 250
     return spawn(wrapper, args, {stdio: 'pipe'})
251
-    .progress(function (stdio) {
252
-        if (stdio.stderr) {
253
-            /*
254
-             * Workaround for the issue with Java printing some unwanted information to
255
-             * stderr instead of stdout.
256
-             * This function suppresses 'Picked up _JAVA_OPTIONS' message from being
257
-             * printed to stderr. See https://issues.apache.org/jira/browse/CB-9971 for
258
-             * explanation.
259
-             */
260
-            var suppressThisLine = /^Picked up _JAVA_OPTIONS: /i.test(stdio.stderr.toString());
261
-            if (suppressThisLine) {
262
-                return;
251
+        .progress(function (stdio) {
252
+            if (stdio.stderr) {
253
+                /*
254
+                 * Workaround for the issue with Java printing some unwanted information to
255
+                 * stderr instead of stdout.
256
+                 * This function suppresses 'Picked up _JAVA_OPTIONS' message from being
257
+                 * printed to stderr. See https://issues.apache.org/jira/browse/CB-9971 for
258
+                 * explanation.
259
+                 */
260
+                var suppressThisLine = /^Picked up _JAVA_OPTIONS: /i.test(stdio.stderr.toString());
261
+                if (suppressThisLine) {
262
+                    return;
263
+                }
264
+                process.stderr.write(stdio.stderr);
265
+            } else {
266
+                process.stdout.write(stdio.stdout);
263 267
             }
264
-            process.stderr.write(stdio.stderr);
265
-        } else {
266
-            process.stdout.write(stdio.stdout);
267
-        }
268
-    }).catch(function (error) {
269
-        if (error.toString().indexOf('failed to find target with hash string') >= 0) {
270
-            return check_reqs.check_android_target(error).then(function () {
271
-                // If due to some odd reason - check_android_target succeeds
272
-                // we should still fail here.
273
-                return Q.reject(error);
274
-            });
275
-        }
276
-        return Q.reject(error);
277
-    });
268
+        }).catch(function (error) {
269
+            if (error.toString().indexOf('failed to find target with hash string') >= 0) {
270
+                return check_reqs.check_android_target(error).then(function () {
271
+                    // If due to some odd reason - check_android_target succeeds
272
+                    // we should still fail here.
273
+                    return Q.reject(error);
274
+                });
275
+            }
276
+            return Q.reject(error);
277
+        });
278 278
 };
279 279
 
280 280
 StudioBuilder.prototype.clean = function (opts) {
@@ -284,16 +284,16 @@ StudioBuilder.prototype.clean = function (opts) {
284 284
     return Q().then(function () {
285 285
         return spawn(wrapper, args, {stdio: 'inherit'});
286 286
     })
287
-    .then(function () {
288
-        shell.rm('-rf', path.join(builder.root, 'out'));
287
+        .then(function () {
288
+            shell.rm('-rf', path.join(builder.root, 'out'));
289 289
 
290
-        ['debug', 'release'].forEach(function (config) {
291
-            var propertiesFilePath = path.join(builder.root, config + SIGNING_PROPERTIES);
292
-            if (isAutoGenerated(propertiesFilePath)) {
293
-                shell.rm('-f', propertiesFilePath);
294
-            }
290
+            ['debug', 'release'].forEach(function (config) {
291
+                var propertiesFilePath = path.join(builder.root, config + SIGNING_PROPERTIES);
292
+                if (isAutoGenerated(propertiesFilePath)) {
293
+                    shell.rm('-f', propertiesFilePath);
294
+                }
295
+            });
295 296
         });
296
-    });
297 297
 };
298 298
 
299 299
 module.exports = StudioBuilder;

+ 2
- 1
node_modules/cordova-android/bin/templates/cordova/lib/emulator.js View File

@@ -344,7 +344,8 @@ module.exports.wait_for_emulator = function (port) {
344 344
         }, function (error) {
345 345
             if ((error && error.message &&
346 346
             (error.message.indexOf('not found') > -1)) ||
347
-            (error.message.indexOf('device offline') > -1)) {
347
+            (error.message.indexOf('device offline') > -1) ||
348
+            (error.message.indexOf('device still connecting') > -1)) {
348 349
                 // emulator not yet started, continue waiting
349 350
                 return self.wait_for_emulator(port);
350 351
             } else {

+ 36
- 11
node_modules/cordova-android/bin/templates/cordova/lib/pluginHandlers.js View File

@@ -34,15 +34,7 @@ var handlers = {
34 34
             // a later plugins release.  This is for legacy plugins to work with Cordova.
35 35
 
36 36
             if (options && options.android_studio === true) {
37
-                // If a Java file is using the new directory structure, don't penalize it
38
-                if (!obj.targetDir.includes('app/src/main')) {
39
-                    if (obj.src.endsWith('.java')) {
40
-                        dest = path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src));
41
-                    } else if (obj.src.endsWith('.xml')) {
42
-                        // We are making a huge assumption here that XML files will be going to res/xml or values/xml
43
-                        dest = path.join('app/src/main', obj.targetDir, path.basename(obj.src));
44
-                    }
45
-                }
37
+                dest = getInstallDestination(obj);
46 38
             }
47 39
 
48 40
             if (options && options.force) {
@@ -55,10 +47,16 @@ var handlers = {
55 47
             var dest = path.join(obj.targetDir, path.basename(obj.src));
56 48
 
57 49
             if (options && options.android_studio === true) {
58
-                dest = path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src));
50
+                dest = getInstallDestination(obj);
59 51
             }
60 52
 
61
-            deleteJava(project.projectDir, dest);
53
+            // TODO: Add Koltin extension to uninstall, since they are handled like Java files
54
+            if (obj.src.endsWith('java')) {
55
+                deleteJava(project.projectDir, dest);
56
+            } else {
57
+                // Just remove the file, not the whole parent directory
58
+                removeFile(project.projectDir, dest);
59
+            }
62 60
         }
63 61
     },
64 62
     'lib-file': {
@@ -318,3 +316,30 @@ function removeFileAndParents (baseDir, destFile, stopper) {
318 316
 function generateAttributeError (attribute, element, id) {
319 317
     return 'Required attribute "' + attribute + '" not specified in <' + element + '> element from plugin: ' + id;
320 318
 }
319
+
320
+function getInstallDestination (obj) {
321
+    var APP_MAIN_PREFIX = 'app/src/main';
322
+
323
+    if (obj.targetDir.startsWith('app')) {
324
+        // If any source file is using the new app directory structure,
325
+        // don't penalize it
326
+        return path.join(obj.targetDir, path.basename(obj.src));
327
+    } else if (obj.src.endsWith('.java')) {
328
+        return path.join(APP_MAIN_PREFIX, 'java', obj.targetDir.substring(4), path.basename(obj.src));
329
+    } else if (obj.src.endsWith('.aidl')) {
330
+        return path.join(APP_MAIN_PREFIX, 'aidl', obj.targetDir.substring(4), path.basename(obj.src));
331
+    } else if (obj.targetDir.includes('libs')) {
332
+        if (obj.src.endsWith('.so')) {
333
+            return path.join(APP_MAIN_PREFIX, 'jniLibs', obj.targetDir.substring(5), path.basename(obj.src));
334
+        } else {
335
+            return path.join('app', obj.targetDir, path.basename(obj.src));
336
+        }
337
+    } else if (obj.targetDir.includes('src/main')) {
338
+        return path.join('app', obj.targetDir, path.basename(obj.src));
339
+    } else {
340
+        // For all other source files not using the new app directory structure,
341
+        // add 'app/src/main' to the targetDir
342
+        return path.join(APP_MAIN_PREFIX, obj.targetDir, path.basename(obj.src));
343
+    }
344
+
345
+}

+ 1
- 1
node_modules/cordova-android/bin/templates/cordova/version View File

@@ -20,7 +20,7 @@
20 20
 */
21 21
 
22 22
 // Coho updates this line:
23
-var VERSION = "7.1.1";
23
+var VERSION = "7.1.4";
24 24
 
25 25
 module.exports.version = VERSION;
26 26
 

+ 14
- 8
node_modules/cordova-android/bin/templates/project/app/build.gradle View File

@@ -69,7 +69,7 @@ ext {
69 69
     if (!project.hasProperty('cdvBuildMultipleApks')) {
70 70
         cdvBuildMultipleApks = null
71 71
     }
72
-    // Whether to append a 0 "abi digit" to versionCode when only a single APK is build 
72
+    // Whether to append a 0 "abi digit" to versionCode when only a single APK is build
73 73
     if (!project.hasProperty('cdvVersionCodeForceAbiDigit')) {
74 74
         cdvVersionCodeForceAbiDigit = null
75 75
     }
@@ -93,11 +93,16 @@ ext {
93 93
 // PLUGIN GRADLE EXTENSIONS START
94 94
 // PLUGIN GRADLE EXTENSIONS END
95 95
 
96
-def hasBuildExtras = file('build-extras.gradle').exists()
97
-if (hasBuildExtras) {
96
+def hasBuildExtras1 = file('build-extras.gradle').exists()
97
+if (hasBuildExtras1) {
98 98
     apply from: 'build-extras.gradle'
99 99
 }
100 100
 
101
+def hasBuildExtras2 = file('../build-extras.gradle').exists()
102
+if (hasBuildExtras2) {
103
+    apply from: '../build-extras.gradle'
104
+}
105
+
101 106
 // Set property defaults after extension .gradle files.
102 107
 if (ext.cdvCompileSdkVersion == null) {
103 108
     ext.cdvCompileSdkVersion = privateHelpers.getProjectTarget()
@@ -117,7 +122,7 @@ if (ext.cdvReleaseSigningPropertiesFile == null && file('../release-signing.prop
117 122
 // Cast to appropriate types.
118 123
 ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean();
119 124
 ext.cdvVersionCodeForceAbiDigit = cdvVersionCodeForceAbiDigit == null ? false : cdvVersionCodeForceAbiDigit.toBoolean();
120
-ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? null : defaultMinSdkVersion
125
+ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? defaultMinSdkVersion : Integer.parseInt('' + cdvMinSdkVersion)
121 126
 ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode)
122 127
 
123 128
 def computeBuildTargetName(debugBuild) {
@@ -174,10 +179,11 @@ android {
174 179
     compileSdkVersion cdvCompileSdkVersion
175 180
     buildToolsVersion cdvBuildToolsVersion
176 181
 
177
-    //This code exists for Crosswalk and other Native APIs.
178
-    //By default, we multiply the existing version code in the Android Manifest by 10 and 
179
-    //add a number for each architecture.  If you are not using Crosswalk or SQLite, you can
180
-    //ignore this chunk of code, and your version codes will be respected.
182
+    // This code exists for Crosswalk and other Native APIs.
183
+    // By default, we multiply the existing version code in the
184
+    // Android Manifest by 10 and add a number for each architecture.
185
+    // If you are not using Crosswalk or SQLite, you can
186
+    // ignore this chunk of code, and your version codes will be respected.
181 187
 
182 188
     if (Boolean.valueOf(cdvBuildMultipleApks)) {
183 189
         flavorDimensions "default"

+ 2
- 2
node_modules/cordova-android/bin/templates/project/assets/www/cordova.js View File

@@ -19,7 +19,7 @@
19 19
  under the License.
20 20
 */
21 21
 ;(function() {
22
-var PLATFORM_VERSION_BUILD_LABEL = '7.1.1';
22
+var PLATFORM_VERSION_BUILD_LABEL = '7.1.4';
23 23
 // file: src/scripts/require.js
24 24
 
25 25
 /* jshint -W079 */
@@ -2186,4 +2186,4 @@ window.cordova = require('cordova');
2186 2186
 
2187 2187
 require('cordova/init');
2188 2188
 
2189
-})();
2189
+})();

+ 0
- 11
node_modules/cordova-android/cordova-js-src/exec.js View File

@@ -109,17 +109,6 @@ function androidExec(success, fail, service, action, args) {
109 109
 }
110 110
 
111 111
 androidExec.init = function() {
112
-    //CB-11828
113
-    //This failsafe checks the version of Android and if it's Jellybean, it switches it to
114
-    //using the Online Event bridge for communicating from Native to JS
115
-    //
116
-    //It's ugly, but it's necessary.
117
-    var check = navigator.userAgent.toLowerCase().match(/android\s[0-9].[0-9]/);
118
-    var version_code = check && check[0].match(/4.[0-3].*/);
119
-    if (version_code != null && nativeToJsBridgeMode == nativeToJsModes.EVAL_BRIDGE) {
120
-      nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT;
121
-    }
122
-
123 112
     bridgeSecret = +prompt('', 'gap_init:' + nativeToJsBridgeMode);
124 113
     channel.onNativeReady.fire();
125 114
 };

+ 4
- 4
node_modules/cordova-android/framework/build.gradle View File

@@ -24,10 +24,10 @@ ext {
24 24
 
25 25
 buildscript {
26 26
     repositories {
27
-        jcenter()
28 27
         maven {
29 28
             url "https://maven.google.com"
30 29
         }
30
+        jcenter()
31 31
     }
32 32
 
33 33
     dependencies {
@@ -42,7 +42,7 @@ apply plugin: 'com.github.dcendents.android-maven'
42 42
 apply plugin: 'com.jfrog.bintray'
43 43
 
44 44
 group = 'org.apache.cordova'
45
-version = '7.1.1'
45
+version = '7.1.4'
46 46
 
47 47
 android {
48 48
     compileSdkVersion cdvCompileSdkVersion
@@ -129,9 +129,9 @@ bintray {
129 129
         licenses = ['Apache-2.0']
130 130
         labels = ['android', 'cordova', 'phonegap']
131 131
         version {
132
-            name = '7.1.1'
132
+            name = '7.1.4'
133 133
             released  = new Date()
134
-            vcsTag = '7.1.1'
134
+            vcsTag = '7.1.4'
135 135
         }
136 136
     }
137 137
 }

+ 1
- 1
node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebView.java View File

@@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
31 31
  * are not expected to implement it.
32 32
  */
33 33
 public interface CordovaWebView {
34
-    public static final String CORDOVA_VERSION = "7.1.1";
34
+    public static final String CORDOVA_VERSION = "7.1.4";
35 35
 
36 36
     void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);
37 37
 

+ 1
- 0
node_modules/cordova-android/node_modules/android-versions/.jshintrc View File

@@ -1,4 +1,5 @@
1 1
 {
2
+  "esversion": 6,
2 3
   "indent":   2,
3 4
   "forin":    true,
4 5
   "noarg":    true,

+ 36
- 29
node_modules/cordova-android/node_modules/android-versions/index.js View File

@@ -30,35 +30,42 @@
30 30
  */
31 31
 
32 32
 var VERSIONS = {
33
-  BASE:                   { api: 1,     ndk: 0, semver: "1.0",               name: "(no code name)",     versionCode: "BASE" },
34
-  BASE_1_1:               { api: 2,     ndk: 0, semver: "1.1",               name: "(no code name)",     versionCode: "BASE_1_1" },
35
-  CUPCAKE:                { api: 3,     ndk: 1, semver: "1.5",               name: "Cupcake",            versionCode: "CUPCAKE" },
36
-  DONUT:                  { api: 4,     ndk: 2, semver: "1.6",               name: "Donut",              versionCode: "DONUT" },
37
-  ECLAIR:                 { api: 5,     ndk: 2, semver: "2.0",               name: "Eclair",             versionCode: "ECLAIR" },
38
-  ECLAIR_0_1:             { api: 6,     ndk: 2, semver: "2.0.1",             name: "Eclair",             versionCode: "ECLAIR_0_1" },
39
-  ECLAIR_MR1:             { api: 7,     ndk: 3, semver: "2.1",               name: "Eclair",             versionCode: "ECLAIR_MR1" },
40
-  FROYO:                  { api: 8,     ndk: 4, semver: "2.2.x",             name: "Froyo",              versionCode: "FROYO" },
41
-  GINGERBREAD:            { api: 9,     ndk: 5, semver: "2.3.0 - 2.3.2",     name: "Gingerbread",        versionCode: "GINGERBREAD" },
42
-  GINGERBREAD_MR1:        { api: 10,    ndk: 5, semver: "2.3.3 - 2.3.7",     name: "Gingerbread",        versionCode: "GINGERBREAD_MR1" },
43
-  HONEYCOMB:              { api: 11,    ndk: 5, semver: "3.0",               name: "Honeycomb",          versionCode: "HONEYCOMB" },
44
-  HONEYCOMB_MR1:          { api: 12,    ndk: 6, semver: "3.1",               name: "Honeycomb",          versionCode: "HONEYCOMB_MR1" },
45
-  HONEYCOMB_MR2:          { api: 13,    ndk: 6, semver: "3.2.x",             name: "Honeycomb",          versionCode: "HONEYCOMB_MR2" },
46
-  ICE_CREAM_SANDWICH:     { api: 14,    ndk: 7, semver: "4.0.1 - 4.0.2",     name: "Ice Cream Sandwich", versionCode: "ICE_CREAM_SANDWICH" },
47
-  ICE_CREAM_SANDWICH_MR1: { api: 15,    ndk: 8, semver: "4.0.3 - 4.0.4",     name: "Ice Cream Sandwich", versionCode: "ICE_CREAM_SANDWICH_MR1" },
48
-  JELLY_BEAN:             { api: 16,    ndk: 8, semver: "4.1.x",             name: "Jellybean",          versionCode: "JELLY_BEAN" },
49
-  JELLY_BEAN_MR1:         { api: 17,    ndk: 8, semver: "4.2.x",             name: "Jellybean",          versionCode: "JELLY_BEAN_MR1" },
50
-  JELLY_BEAN_MR2:         { api: 18,    ndk: 8, semver: "4.3.x",             name: "Jellybean",          versionCode: "JELLY_BEAN_MR2" },
51
-  KITKAT:                 { api: 19,    ndk: 8, semver: "4.4.0 - 4.4.4",     name: "KitKat",             versionCode: "KITKAT" },
52
-  KITKAT_WATCH:           { api: 20,    ndk: 8, semver: "4.4",               name: "KitKat Watch",       versionCode: "KITKAT_WATCH" },
53
-  LOLLIPOP:               { api: 21,    ndk: 8, semver: "5.0",               name: "Lollipop",           versionCode: "LOLLIPOP" },
54
-  LOLLIPOP_MR1:           { api: 22,    ndk: 8, semver: "5.1",               name: "Lollipop",           versionCode: "LOLLIPOP_MR1" },
55
-  M:                      { api: 23,    ndk: 8, semver: "6.0",               name: "Marshmallow",        versionCode: "M" },
56
-  N:                      { api: 24,    ndk: 8, semver: "7.0",               name: "Nougat",             versionCode: "N" },
57
-  N_MR1:                  { api: 25,    ndk: 8, semver: "7.1",               name: "Nougat",             versionCode: "N_MR1" },
58
-  O:                      { api: 26,    ndk: 8, semver: "8.0.0",             name: "Oreo",               versionCode: "O" },
59
-  O_MR1:                  { api: 27,    ndk: 8, semver: "8.1.0",             name: "Oreo",               versionCode: "O_MR1" }
33
+  BASE:                   { api: 1,     ndk: 0, semver: "1.0",               name: "(no code name)",     },
34
+  BASE_1_1:               { api: 2,     ndk: 0, semver: "1.1",               name: "(no code name)",     },
35
+  CUPCAKE:                { api: 3,     ndk: 1, semver: "1.5",               name: "Cupcake",            },
36
+  DONUT:                  { api: 4,     ndk: 2, semver: "1.6",               name: "Donut",              },
37
+  ECLAIR:                 { api: 5,     ndk: 2, semver: "2.0",               name: "Eclair",             },
38
+  ECLAIR_0_1:             { api: 6,     ndk: 2, semver: "2.0.1",             name: "Eclair",             },
39
+  ECLAIR_MR1:             { api: 7,     ndk: 3, semver: "2.1",               name: "Eclair",             },
40
+  FROYO:                  { api: 8,     ndk: 4, semver: "2.2.x",             name: "Froyo",              },
41
+  GINGERBREAD:            { api: 9,     ndk: 5, semver: "2.3.0 - 2.3.2",     name: "Gingerbread",        },
42
+  GINGERBREAD_MR1:        { api: 10,    ndk: 5, semver: "2.3.3 - 2.3.7",     name: "Gingerbread",        },
43
+  HONEYCOMB:              { api: 11,    ndk: 5, semver: "3.0",               name: "Honeycomb",          },
44
+  HONEYCOMB_MR1:          { api: 12,    ndk: 6, semver: "3.1",               name: "Honeycomb",          },
45
+  HONEYCOMB_MR2:          { api: 13,    ndk: 6, semver: "3.2.x",             name: "Honeycomb",          },
46
+  ICE_CREAM_SANDWICH:     { api: 14,    ndk: 7, semver: "4.0.1 - 4.0.2",     name: "Ice Cream Sandwich", },
47
+  ICE_CREAM_SANDWICH_MR1: { api: 15,    ndk: 8, semver: "4.0.3 - 4.0.4",     name: "Ice Cream Sandwich", },
48
+  JELLY_BEAN:             { api: 16,    ndk: 8, semver: "4.1.x",             name: "Jellybean",          },
49
+  JELLY_BEAN_MR1:         { api: 17,    ndk: 8, semver: "4.2.x",             name: "Jellybean",          },
50
+  JELLY_BEAN_MR2:         { api: 18,    ndk: 8, semver: "4.3.x",             name: "Jellybean",          },
51
+  KITKAT:                 { api: 19,    ndk: 8, semver: "4.4.0 - 4.4.4",     name: "KitKat",             },
52
+  KITKAT_WATCH:           { api: 20,    ndk: 8, semver: "4.4",               name: "KitKat Watch",       },
53
+  LOLLIPOP:               { api: 21,    ndk: 8, semver: "5.0",               name: "Lollipop",           },
54
+  LOLLIPOP_MR1:           { api: 22,    ndk: 8, semver: "5.1",               name: "Lollipop",           },
55
+  M:                      { api: 23,    ndk: 8, semver: "6.0",               name: "Marshmallow",        },
56
+  N:                      { api: 24,    ndk: 8, semver: "7.0",               name: "Nougat",             },
57
+  N_MR1:                  { api: 25,    ndk: 8, semver: "7.1",               name: "Nougat",             },
58
+  O:                      { api: 26,    ndk: 8, semver: "8.0.0",             name: "Oreo",               },
59
+  O_MR1:                  { api: 27,    ndk: 8, semver: "8.1.0",             name: "Oreo",               },
60
+  P:                      { api: 28,    ndk: 8, semver: "9",                 name: "Pie",                }
60 61
 }
61 62
 
63
+// Add a key to each version of Android for the "versionCode".
64
+// This is the same key we use in the VERSIONS map above.
65
+Object.keys(VERSIONS).forEach(function(version) {
66
+  VERSIONS[version].versionCode = version
67
+})
68
+
62 69
 var semver = require('semver');
63 70
 
64 71
 // semver format requires <major>.<minor>.<patch> but we allow just <major>.<minor> format.
@@ -82,8 +89,8 @@ function getFromDefaultPredicate(arg) {
82 89
       return true
83 90
     }
84 91
 
85
-    let argSemver = formatSemver(arg);
86
-    let versionSemver = formatSemver(version.semver);
92
+    var argSemver = formatSemver(arg)
93
+    var versionSemver = formatSemver(version.semver)
87 94
 
88 95
     if (semver.valid(argSemver) && semver.satisfies(argSemver, versionSemver)) {
89 96
       return true

+ 11
- 11
node_modules/cordova-android/node_modules/android-versions/package.json View File

@@ -1,26 +1,26 @@
1 1
 {
2
-  "_from": "android-versions@1.3.0",
3
-  "_id": "android-versions@1.3.0",
2
+  "_from": "android-versions@1",
3
+  "_id": "android-versions@1.4.0",
4 4
   "_inBundle": true,
5
-  "_integrity": "sha512-d/i1G16Oaw/T1EvskUA7Oo1vIQVK/0ZlpQgZfYVBwg6v/9FBE3QV66g5N1/bTHpRml8tFLxh+KoTw5DokK9c+A==",
5
+  "_integrity": "sha512-GnomfYsBq+nZh3c3UH/4r9Jt6FuTxdhUJbeHIdYOH5xBhQ8I0ZzC2/RM5IFFIjrzuNWSHb8JWP1lPK0/a26jrg==",
6 6
   "_location": "/cordova-android/android-versions",
7 7
   "_phantomChildren": {},
8 8
   "_requested": {
9
-    "type": "version",
9
+    "type": "range",
10 10
     "registry": true,
11
-    "raw": "android-versions@1.3.0",
11
+    "raw": "android-versions@1",
12 12
     "name": "android-versions",
13 13
     "escapedName": "android-versions",
14
-    "rawSpec": "1.3.0",
14
+    "rawSpec": "1",
15 15
     "saveSpec": null,
16
-    "fetchSpec": "1.3.0"
16
+    "fetchSpec": "1"
17 17
   },
18 18
   "_requiredBy": [
19 19
     "/cordova-android"
20 20
   ],
21
-  "_resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.3.0.tgz",
22
-  "_shasum": "ce6f3eae2e165ce4ed49b89beb68014741093044",
23
-  "_spec": "android-versions@1.3.0",
21
+  "_resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.4.0.tgz",
22
+  "_shasum": "807ea2941d7e5780e6dd61c5d9b7b6f3c0706e09",
23
+  "_spec": "android-versions@1",
24 24
   "_where": "/Users/brodybits/Documents/cordova/cordova-android",
25 25
   "author": {
26 26
     "name": "dvoiss"
@@ -63,5 +63,5 @@
63 63
     "jshint": "jshint .",
64 64
     "test": "tape tests/**/*.js"
65 65
   },
66
-  "version": "1.3.0"
66
+  "version": "1.4.0"
67 67
 }

+ 28
- 28
node_modules/cordova-android/node_modules/android-versions/tests/index.test.js View File

@@ -1,7 +1,7 @@
1 1
 "use strict";
2 2
 
3
-var test = require('tape')
4
-var android = require('..')
3
+const test = require('tape')
4
+const android = require('..')
5 5
 
6 6
 test('get specific version by API level', (t) => {
7 7
   t.plan(1)
@@ -16,7 +16,7 @@ test('getAll versions by API level', (t) => {
16 16
 test('get specific version by predicate', (t) => {
17 17
   t.plan(2)
18 18
 
19
-  var actual = android.get((version) => {
19
+  let actual = android.get((version) => {
20 20
     return version.name.indexOf("on") !== -1
21 21
   })
22 22
   t.equal(actual.name, "Donut")
@@ -30,7 +30,7 @@ test('get specific version by predicate', (t) => {
30 30
 test('getAll versions by predicate', (t) => {
31 31
   t.plan(3)
32 32
 
33
-  var actual = android.getAll((version) => {
33
+  let actual = android.getAll((version) => {
34 34
     return version.name.indexOf("on") !== -1
35 35
   }).map((version) => version.name)
36 36
   t.deepEqual(actual, ["Donut", "Honeycomb", "Honeycomb", "Honeycomb"])
@@ -43,7 +43,7 @@ test('getAll versions by predicate', (t) => {
43 43
   actual = android.getAll((version) => {
44 44
     return version.api > 22
45 45
   }).map((version) => version.versionCode)
46
-  t.deepEqual(actual, ["M", "N", "N_MR1", "O", "O_MR1"])
46
+  t.deepEqual(actual, ["M", "N", "N_MR1", "O", "O_MR1", "P"])
47 47
 })
48 48
 
49 49
 test('get version by semantic version', (t) => {
@@ -54,32 +54,31 @@ test('get version by semantic version', (t) => {
54 54
   t.equal(android.get("2.3.3").versionCode, android.GINGERBREAD_MR1.versionCode)
55 55
 })
56 56
 
57
+test('support major version only', (t) => {
58
+  t.plan(2)
59
+  t.equal(android.get("9.0").versionCode, android.P.versionCode)
60
+  t.equal(android.get("9.0.0").versionCode, android.P.versionCode)
61
+})
62
+
57 63
 test('support version ranges', (t) => {
58
-  t.plan(7);
59
-  t.equal(android.get("4.4").versionCode, android.KITKAT.versionCode);
60
-  t.equal(android.get("4.4.0").versionCode, android.KITKAT.versionCode);
61
-  t.equal(android.get("4.4.1").versionCode, android.KITKAT.versionCode);
62
-  t.equal(android.get("4.4.2").versionCode, android.KITKAT.versionCode);
63
-  t.equal(android.get("4.4.3").versionCode, android.KITKAT.versionCode);
64
-  t.equal(android.get("4.4.4").versionCode, android.KITKAT.versionCode);
65
-  t.equal(android.get("4.4.5"), null);
64
+  t.plan(7)
65
+  let tests = [ "4.4", "4.4.0", "4.4.1", "4.4.2", "4.4.3", "4.4.4" ]
66
+  tests.forEach((versionCode) => {
67
+    t.equal(android.get(versionCode).versionCode, android.KITKAT.versionCode)
68
+  })
69
+  t.equal(android.get("4.4.5"), null)
66 70
 })
67 71
 
68 72
 test('support x-ranges', (t) => {
69
-  t.plan(12);
70
-  t.equal(android.get("4.1").versionCode, android.JELLY_BEAN.versionCode);
71
-  t.equal(android.get("4.1.0").versionCode, android.JELLY_BEAN.versionCode);
72
-  t.equal(android.get("4.1.1").versionCode, android.JELLY_BEAN.versionCode);
73
-  t.equal(android.get("4.1.2").versionCode, android.JELLY_BEAN.versionCode);
74
-  t.equal(android.get("4.1.3").versionCode, android.JELLY_BEAN.versionCode);
75
-  t.equal(android.get("4.1.4").versionCode, android.JELLY_BEAN.versionCode);
76
-  t.equal(android.get("4.1.5").versionCode, android.JELLY_BEAN.versionCode);
77
-  t.equal(android.get("4.1.6").versionCode, android.JELLY_BEAN.versionCode);
78
-  t.equal(android.get("4.1.7").versionCode, android.JELLY_BEAN.versionCode);
79
-  t.equal(android.get("4.1.8").versionCode, android.JELLY_BEAN.versionCode);
80
-  t.equal(android.get("4.1.9").versionCode, android.JELLY_BEAN.versionCode);
81
-  t.equal(android.get("4.1.10").versionCode, android.JELLY_BEAN.versionCode);
82
-});
73
+  t.plan(12)
74
+  let tests = [
75
+    "4.1", "4.1.0", "4.1.1", "4.1.2", "4.1.3", "4.1.4",
76
+    "4.1.5", "4.1.6", "4.1.7", "4.1.8", "4.1.9", "4.1.10"
77
+  ]
78
+  tests.forEach((versionCode) => {
79
+    t.equal(android.get(versionCode).versionCode, android.JELLY_BEAN.versionCode)
80
+  })
81
+})
83 82
 
84 83
 test('access version codes object', (t) => {
85 84
   t.plan(1)
@@ -87,7 +86,7 @@ test('access version codes object', (t) => {
87 86
 })
88 87
 
89 88
 test('access specific versions directly', (t) => {
90
-  t.plan(27)
89
+  t.plan(28)
91 90
   t.ok(android.BASE)
92 91
   t.ok(android.BASE_1_1)
93 92
   t.ok(android.CUPCAKE)
@@ -115,4 +114,5 @@ test('access specific versions directly', (t) => {
115 114
   t.ok(android.N_MR1)
116 115
   t.ok(android.O)
117 116
   t.ok(android.O_MR1)
117
+  t.ok(android.P)
118 118
 })

+ 14
- 14
node_modules/cordova-android/package.json View File

@@ -1,27 +1,27 @@
1 1
 {
2
-  "_from": "cordova-android@^7.1.1",
3
-  "_id": "cordova-android@7.1.1",
2
+  "_from": "cordova-android@^7.1.4",
3
+  "_id": "cordova-android@7.1.4",
4 4
   "_inBundle": false,
5
-  "_integrity": "sha512-MAOwEMT3TuGjKw4McNzzYyHmxkWY3ozafbIgdMAvPzqSBVGIcn+H3SmWfaHtUXfmIPFliT171ICsSm6W5lZXEA==",
5
+  "_integrity": "sha512-Rtvu002I83uzfVyCsE6p2krFKVHt9TSAqZUATes+zH+o9cdxYGrLHY+PKCQo4SLCdSMdrkIHCDnQPTYTp/d7+g==",
6 6
   "_location": "/cordova-android",
7 7
   "_phantomChildren": {},
8 8
   "_requested": {
9 9
     "type": "range",
10 10
     "registry": true,
11
-    "raw": "cordova-android@^7.1.1",
11
+    "raw": "cordova-android@^7.1.4",
12 12
     "name": "cordova-android",
13 13
     "escapedName": "cordova-android",
14
-    "rawSpec": "^7.1.1",
14
+    "rawSpec": "^7.1.4",
15 15
     "saveSpec": null,
16
-    "fetchSpec": "^7.1.1"
16
+    "fetchSpec": "^7.1.4"
17 17
   },
18 18
   "_requiredBy": [
19 19
     "#USER",
20 20
     "/"
21 21
   ],
22
-  "_resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.1.tgz",
23
-  "_shasum": "711559ee18f5f625a2348d4ce348930d14890e2d",
24
-  "_spec": "cordova-android@^7.1.1",
22
+  "_resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.4.tgz",
23
+  "_shasum": "25261ad66cc64f42a30b70be005901fa30e2430e",
24
+  "_spec": "cordova-android@^7.1.4",
25 25
   "_where": "/home/cromer/WebstormProjects/jvon-mobile",
26 26
   "author": {
27 27
     "name": "Apache Software Foundation"
@@ -66,11 +66,11 @@
66 66
   ],
67 67
   "dependencies": {
68 68
     "abbrev": "*",
69
-    "android-versions": "1.3.0",
69
+    "android-versions": "1.4.0",
70 70
     "ansi": "*",
71 71
     "balanced-match": "*",
72 72
     "base64-js": "1.2.0",
73
-    "big-integer": "*",
73
+    "big-integer": "1.6.32",
74 74
     "bplist-parser": "*",
75 75
     "brace-expansion": "*",
76 76
     "concat-map": "*",
@@ -83,12 +83,12 @@
83 83
     "minimatch": "*",
84 84
     "nopt": "3.0.1",
85 85
     "once": "*",
86
-    "path-is-absolute": "*",
86
+    "path-is-absolute": "1.0.1",
87 87
     "plist": "2.1.0",
88 88
     "properties-parser": "0.2.3",
89 89
     "q": "1.4.1",
90 90
     "sax": "0.3.5",
91
-    "semver": "*",
91
+    "semver": "5.5.0",
92 92
     "shelljs": "0.5.3",
93 93
     "underscore": "*",
94 94
     "unorm": "*",
@@ -136,5 +136,5 @@
136 136
     "test": "npm run eslint && npm run unit-tests && npm run java-unit-tests && npm run e2e-tests",
137 137
     "unit-tests": "jasmine --config=spec/unit/jasmine.json"
138 138
   },
139
-  "version": "7.1.1"
139
+  "version": "7.1.4"
140 140
 }

+ 0
- 69
node_modules/cordova-android/spec/fixtures/android_project/AndroidManifest.xml View File

@@ -1,69 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<!--
3
-
4
- Copyright 2013 Anis Kadri
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
-   http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing,
13
- software distributed under the License is distributed on an
14
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- KIND, either express or implied.  See the License for the
16
- specific language governing permissions and limitations
17
- under the License.
18
-
19
--->
20
-
21
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
22
-      package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
23
-    <supports-screens
24
-    	android:largeScreens="true"
25
-    	android:normalScreens="true"
26
-    	android:smallScreens="true"
27
-    	android:xlargeScreens="true"
28
-    	android:resizeable="true"
29
-    	android:anyDensity="true"
30
-    	/>
31
-
32
-    <uses-permission android:name="android.permission.CAMERA" />
33
-    <uses-permission android:name="android.permission.VIBRATE" />
34
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
35
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
36
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
37
-    <uses-permission android:name="android.permission.INTERNET" />
38
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
39
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
40
-    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
41
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
42
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
43
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
44
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
45
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
46
-    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
47
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
48
-
49
-    <uses-feature android:name="android.hardware.camera" />
50
-    <uses-feature android:name="android.hardware.camera.autofocus" />
51
-
52
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
53
-    	android:debuggable="true">
54
-		<activity android:name="ChildApp" android:label="@string/app_name" 
55
-				  android:configChanges="orientation|keyboardHidden">
56
-			<intent-filter>
57
-				<action android:name="android.intent.action.MAIN" />
58
-				<category android:name="android.intent.category.LAUNCHER" />
59
-			</intent-filter>
60
-        </activity>
61
-        <activity android:name="org.test.DroidGap" android:label="@string/app_name" 
62
-            	  android:configChanges="orientation|keyboardHidden">
63
-        	<intent-filter>
64
-        	</intent-filter>
65
-        </activity>
66
-    </application>
67
-
68
-	<uses-sdk android:minSdkVersion="5" />
69
-</manifest> 

+ 0
- 0
node_modules/cordova-android/spec/fixtures/android_project/assets/www/.gitkeep View File


+ 0
- 54
node_modules/cordova-android/spec/fixtures/android_project/res/xml/config.xml View File

@@ -1,54 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<!--
3
-       Licensed to the Apache Software Foundation (ASF) under one
4
-       or more contributor license agreements.  See the NOTICE file
5
-       distributed with this work for additional information
6
-       regarding copyright ownership.  The ASF licenses this file
7
-       to you under the Apache License, Version 2.0 (the
8
-       "License"); you may not use this file except in compliance
9
-       with the License.  You may obtain a copy of the License at
10
-
11
-         http://www.apache.org/licenses/LICENSE-2.0
12
-
13
-       Unless required by applicable law or agreed to in writing,
14
-       software distributed under the License is distributed on an
15
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
-       KIND, either express or implied.  See the License for the
17
-       specific language governing permissions and limitations
18
-       under the License.
19
--->
20
-<cordova>
21
-    <!--
22
-    access elements control the Android whitelist.
23
-    Domains are assumed blocked unless set otherwise
24
-     -->
25
-
26
-    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
27
-
28
-    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
29
-    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
30
-    <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
31
-
32
-    <log level="DEBUG"/>
33
-    <preference name="useBrowserHistory" value="false" />
34
-<plugins>
35
-    <plugin name="App" value="org.apache.cordova.App"/>
36
-    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
37
-    <plugin name="Device" value="org.apache.cordova.Device"/>
38
-    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
39
-    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
40
-    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
41
-    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
42
-    <plugin name="org.apache.cordova.core.contacts" value="org.apache.cordova.ContactManager"/>
43
-    <plugin name="File" value="org.apache.cordova.FileUtils"/>
44
-    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
45
-    <plugin name="Notification" value="org.apache.cordova.Notification"/>
46
-    <plugin name="Storage" value="org.apache.cordova.Storage"/>
47
-    <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
48
-    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
49
-    <plugin name="Capture" value="org.apache.cordova.Capture"/>
50
-    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
51
-    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
52
-</plugins>
53
-</cordova>
54
-

+ 0
- 0
node_modules/cordova-android/spec/fixtures/android_project/src/.gitkeep View File


+ 2
- 0
node_modules/cordova-android/spec/fixtures/android_studio_project/build.gradle View File

@@ -2,6 +2,7 @@
2 2
 
3 3
 buildscript {
4 4
     repositories {
5
+        google()
5 6
         jcenter()
6 7
     }
7 8
     dependencies {
@@ -14,6 +15,7 @@ buildscript {
14 15
 
15 16
 allprojects {
16 17
     repositories {
18
+        google()
17 19
         jcenter()
18 20
     }
19 21
 }

+ 14
- 0
node_modules/cordova-android/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml View File

@@ -70,6 +70,20 @@
70 70
 
71 71
         <source-file src="src/android/DummyPlugin.java"
72 72
                 target-dir="src/com/phonegap/plugins/dummyplugin" />
73
+        <source-file src="src/android/DummyPlugin2.java"
74
+                target-dir="app/src/main/src/com/phonegap/plugins/dummyplugin" />
75
+        <source-file src="src/android/TestLib.jar"
76
+                target-dir="app/libs" />
77
+        <source-file src="src/android/TestAar.aar"
78
+                target-dir="app/libs" />
79
+        <source-file src="src/android/mysettings.xml" target-dir="res/xml" />
80
+        <source-file src="src/android/other.extension" target-dir="res/values" />
81
+	<source-file src="src/android/myapi.aidl" target-dir="src/com/mytest" />
82
+	<source-file src="src/android/testaar2.aar" target-dir="libs" />
83
+	<source-file src="src/android/testjar2.jar" target-dir="libs" />
84
+	<source-file src="src/android/jniLibs/x86/libnative.so" target-dir="libs/x86" />
85
+        <source-file src="src/android/DummyPlugin2.java"
86
+                target-dir="src/com/appco" />
73 87
         <lib-file src="src/android/TestLib.jar" />
74 88
     </platform>
75 89
 </plugin>

+ 0
- 31
node_modules/cordova-android/spec/unit/AndroidProject.spec.js View File

@@ -1,31 +0,0 @@
1
-/**
2
-    Licensed to the Apache Software Foundation (ASF) under one
3
-    or more contributor license agreements.  See the NOTICE file
4
-    distributed with this work for additional information
5
-    regarding copyright ownership.  The ASF licenses this file
6
-    to you under the Apache License, Version 2.0 (the
7
-    "License"); you may not use this file except in compliance
8
-    with the License.  You may obtain a copy of the License at
9
-
10
-    http://www.apache.org/licenses/LICENSE-2.0
11
-
12
-    Unless required by applicable law or agreed to in writing,
13
-    software distributed under the License is distributed on an
14
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
-    KIND, either express or implied.  See the License for the
16
-    specific language governing permissions and limitations
17
-    under the License.
18
-*/
19
-
20
-var path = require('path');
21
-var AndroidProject = require('../../bin/templates/cordova/lib/AndroidProject');
22
-var android_project = path.join(__dirname, '../fixtures/android_project');
23
-
24
-describe('AndroidProject class', function () {
25
-    describe('getPackageName method', function () {
26
-        it('Test#001 : should return an android project\'s proper package name', function () {
27
-            expect(AndroidProject.getProjectFile(android_project).getPackageName())
28
-                .toEqual('com.alunny.childapp');
29
-        });
30
-    });
31
-});

+ 0
- 5
node_modules/cordova-android/spec/unit/AndroidStudio.spec.js View File

@@ -8,9 +8,4 @@ describe('AndroidStudio module', function () {
8 8
         var isAndStud = AndroidStudio.isAndroidStudioProject(root);
9 9
         expect(isAndStud).toBe(true);
10 10
     });
11
-    it('should return false non Android Studio project', function () {
12
-        var root = path.join(__dirname, '../fixtures/android_project/');
13
-        var isAndStud = AndroidStudio.isAndroidStudioProject(root);
14
-        expect(isAndStud).toBe(false);
15
-    });
16 11
 });

+ 161
- 53
node_modules/cordova-android/spec/unit/pluginHandlers/handlers.spec.js View File

@@ -28,7 +28,7 @@ var temp = path.join(os.tmpdir(), 'plugman');
28 28
 var plugins_dir = path.join(temp, 'cordova/plugins');
29 29
 var dummyplugin = path.join(__dirname, '../../fixtures/org.test.plugins.dummyplugin');
30 30
 var faultyplugin = path.join(__dirname, '../../fixtures/org.test.plugins.faultyplugin');
31
-var android_project = path.join(__dirname, '../../fixtures/android_project/*');
31
+var android_studio_project = path.join(__dirname, '../../fixtures/android_studio_project/*');
32 32
 
33 33
 var PluginInfo = require('cordova-common').PluginInfo;
34 34
 var AndroidProject = require('../../../bin/templates/cordova/lib/AndroidProject');
@@ -60,48 +60,44 @@ describe('android project handler', function () {
60 60
         });
61 61
 
62 62
         describe('of <lib-file> elements', function () {
63
-            it('Test#001 : should copy files', function () {
64
-                android['lib-file'].install(valid_libs[0], dummyPluginInfo, dummyProject);
65
-                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin, 'src/android/TestLib.jar', temp, path.join('libs', 'TestLib.jar'), false);
66
-            });
67
-            it('Test#002 : should copy files for Android Studio projects', function () {
63
+            it('Test#001 : should copy files for Android Studio projects', function () {
68 64
                 android['lib-file'].install(valid_libs[0], dummyPluginInfo, dummyProject, {android_studio: true});
69 65
                 expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin, 'src/android/TestLib.jar', temp, path.join('app', 'libs', 'TestLib.jar'), false);
70 66
             });
71 67
         });
72 68
 
73 69
         describe('of <resource-file> elements', function () {
74
-            it('Test#003 : should copy files to the correct location on a non-Android Studio project', function () {
75
-                android['resource-file'].install(valid_resources[0], dummyPluginInfo, dummyProject);
76
-                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin, 'android-resource.xml', temp, path.join('res', 'xml', 'dummy.xml'), false);
70
+            it('Test#002 : should copy files to the correct location on an Android Studio project', function () {
71
+                android['resource-file'].install(valid_resources[0], dummyPluginInfo, dummyProject, {android_studio: true});
72
+                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin, 'android-resource.xml', temp, path.join('app', 'src', 'main', 'res', 'xml', 'dummy.xml'), false);
77 73
             });
78 74
         });
79 75
 
80 76
         describe('of <source-file> elements', function () {
81 77
             beforeEach(function () {
82
-                shell.cp('-rf', android_project, temp);
78
+                shell.cp('-rf', android_studio_project, temp);
83 79
             });
84 80
 
85
-            it('Test#004 : should copy stuff from one location to another by calling common.copyFile', function () {
81
+            it('Test#003 : should copy stuff from one location to another by calling common.copyFile', function () {
86 82
                 android['source-file'].install(valid_source[0], dummyPluginInfo, dummyProject);
87 83
                 expect(copyFileSpy)
88 84
                     .toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin.java', temp, path.join('src/com/phonegap/plugins/dummyplugin/DummyPlugin.java'), false);
89 85
             });
90 86
 
91
-            it('Test#005 : should install source files to the right location for Android Studio projects', function () {
87
+            it('Test#004 : should install source files to the right location for Android Studio projects', function () {
92 88
                 android['source-file'].install(valid_source[0], dummyPluginInfo, dummyProject, {android_studio: true});
93 89
                 expect(copyFileSpy)
94 90
                     .toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin.java', temp, path.join('app/src/main/java/com/phonegap/plugins/dummyplugin/DummyPlugin.java'), false);
95 91
             });
96 92
 
97
-            it('Test#006 : should throw if source file cannot be found', function () {
93
+            it('Test#005 : should throw if source file cannot be found', function () {
98 94
                 common.__set__('copyFile', copyFileOrig);
99 95
                 expect(function () {
100 96
                     android['source-file'].install(invalid_source[0], faultyPluginInfo, dummyProject);
101 97
                 }).toThrow(new Error('"' + path.resolve(faultyplugin, 'src/android/NotHere.java') + '" not found!'));
102 98
             });
103 99
 
104
-            it('Test#007 : should throw if target file already exists', function () {
100
+            it('Test#006 : should throw if target file already exists', function () {
105 101
                 // write out a file
106 102
                 var target = path.resolve(temp, 'src/com/phonegap/plugins/dummyplugin');
107 103
                 shell.mkdir('-p', target);
@@ -112,6 +108,73 @@ describe('android project handler', function () {
112 108
                     android['source-file'].install(valid_source[0], dummyPluginInfo, dummyProject);
113 109
                 }).toThrow(new Error('"' + target + '" already exists!'));
114 110
             });
111
+
112
+            // TODO: renumber these tests and other tests below
113
+            it('Test#00a6 : should allow installing sources with new app target-dir scheme', function () {
114
+                android['source-file'].install(valid_source[1], dummyPluginInfo, dummyProject, {android_studio: true});
115
+                expect(copyFileSpy)
116
+                    .toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin2.java', temp, path.join('app/src/main/src/com/phonegap/plugins/dummyplugin/DummyPlugin2.java'), false);
117
+            });
118
+
119
+            it('Test#006b : should allow installing jar lib file from sources with new app target-dir scheme', function () {
120
+                android['source-file'].install(valid_source[2], dummyPluginInfo, dummyProject, {android_studio: true});
121
+                expect(copyFileSpy)
122
+                    .toHaveBeenCalledWith(dummyplugin, 'src/android/TestLib.jar', temp, path.join('app/libs/TestLib.jar'), false);
123
+            });
124
+
125
+            it('Test#006c : should allow installing aar lib file from sources with new app target-dir scheme', function () {
126
+                android['source-file'].install(valid_source[3], dummyPluginInfo, dummyProject, {android_studio: true});
127
+                expect(copyFileSpy)
128
+                    .toHaveBeenCalledWith(dummyplugin, 'src/android/TestAar.aar', temp, path.join('app/libs/TestAar.aar'), false);
129
+            });
130
+
131
+            it('Test#006d : should allow installing xml file from sources with old target-dir scheme', function () {
132
+                android['source-file'].install(valid_source[4], dummyPluginInfo, dummyProject, {android_studio: true});
133
+                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
134
+                    'src/android/mysettings.xml', temp,
135
+                    path.join('app/src/main/res/xml/mysettings.xml'), false);
136
+            });
137
+
138
+            it('Test#006e : should allow installing file with other extension from sources with old target-dir scheme', function () {
139
+                android['source-file'].install(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
140
+                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
141
+                    'src/android/other.extension', temp,
142
+                    path.join('app/src/main/res/values/other.extension'), false);
143
+            });
144
+
145
+            it('Test#006f : should allow installing aidl file from sources with old target-dir scheme (GH-547)', function () {
146
+                android['source-file'].install(valid_source[6], dummyPluginInfo, dummyProject, {android_studio: true});
147
+                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
148
+                    'src/android/myapi.aidl', temp,
149
+                    path.join('app/src/main/aidl/com/mytest/myapi.aidl'), false);
150
+            });
151
+
152
+            it('Test#006g : should allow installing aar lib file from sources with old target-dir scheme (GH-547)', function () {
153
+                android['source-file'].install(valid_source[7], dummyPluginInfo, dummyProject, {android_studio: true});
154
+                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
155
+                    'src/android/testaar2.aar', temp,
156
+                    path.join('app/libs/testaar2.aar'), false);
157
+            });
158
+
159
+            it('Test#006h : should allow installing jar lib file from sources with old target-dir scheme (GH-547)', function () {
160
+                android['source-file'].install(valid_source[8], dummyPluginInfo, dummyProject, {android_studio: true});
161
+                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
162
+                    'src/android/testjar2.jar', temp,
163
+                    path.join('app/libs/testjar2.jar'), false);
164
+            });
165
+
166
+            it('Test#006i : should allow installing .so lib file from sources with old target-dir scheme (GH-547)', function () {
167
+                android['source-file'].install(valid_source[9], dummyPluginInfo, dummyProject, {android_studio: true});
168
+                expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
169
+                    'src/android/jniLibs/x86/libnative.so', temp,
170
+                    path.join('app/src/main/jniLibs/x86/libnative.so'), false);
171
+            });
172
+
173
+            it('Test#006j : should allow installing sources with target-dir that includes "app"', function () {
174
+                android['source-file'].install(valid_source[10], dummyPluginInfo, dummyProject, {android_studio: true});
175
+                expect(copyFileSpy)
176
+                    .toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin2.java', temp, path.join('app/src/main/java/com/appco/DummyPlugin2.java'), false);
177
+            });
115 178
         });
116 179
 
117 180
         describe('of <framework> elements', function () {
@@ -122,7 +185,7 @@ describe('android project handler', function () {
122 185
             var copyNewFileSpy = jasmine.createSpy('copyNewFile');
123 186
 
124 187
             beforeEach(function () {
125
-                shell.cp('-rf', android_project, temp);
188
+                shell.cp('-rf', android_studio_project, temp);
126 189
 
127 190
                 spyOn(dummyProject, 'addSystemLibrary');
128 191
                 spyOn(dummyProject, 'addSubProject');
@@ -134,23 +197,23 @@ describe('android project handler', function () {
134 197
                 common.__set__('copyNewFile', copyNewFileOrig);
135 198
             });
136 199
 
137
-            it('Test#008 : should throw if framework doesn\'t have "src" attribute', function () {
200
+            it('Test#007 : should throw if framework doesn\'t have "src" attribute', function () {
138 201
                 expect(function () { android.framework.install({}, dummyPluginInfo, dummyProject); }).toThrow();
139 202
             });
140 203
 
141
-            it('Test#009 : should install framework without "parent" attribute into project root', function () {
204
+            it('Test#008 : should install framework without "parent" attribute into project root', function () {
142 205
                 var framework = {src: 'plugin-lib'};
143 206
                 android.framework.install(framework, dummyPluginInfo, dummyProject);
144 207
                 expect(dummyProject.addSystemLibrary).toHaveBeenCalledWith(dummyProject.projectDir, someString);
145 208
             });
146 209
 
147
-            it('Test#010 : should install framework with "parent" attribute into parent framework dir', function () {
210
+            it('Test#009 : should install framework with "parent" attribute into parent framework dir', function () {
148 211
                 var childFramework = {src: 'plugin-lib2', parent: 'plugin-lib'};
149 212
                 android.framework.install(childFramework, dummyPluginInfo, dummyProject);
150 213
                 expect(dummyProject.addSystemLibrary).toHaveBeenCalledWith(path.resolve(dummyProject.projectDir, childFramework.parent), someString);
151 214
             });
152 215
 
153
-            it('Test#011 : should not copy anything if "custom" attribute is not set', function () {
216
+            it('Test#010 : should not copy anything if "custom" attribute is not set', function () {
154 217
                 var framework = {src: 'plugin-lib'};
155 218
                 var cpSpy = spyOn(shell, 'cp');
156 219
                 android.framework.install(framework, dummyPluginInfo, dummyProject);
@@ -158,14 +221,14 @@ describe('android project handler', function () {
158 221
                 expect(cpSpy).not.toHaveBeenCalled();
159 222
             });
160 223
 
161
-            it('Test#012 : should copy framework sources if "custom" attribute is set', function () {
224
+            it('Test#011 : should copy framework sources if "custom" attribute is set', function () {
162 225
                 var framework = {src: 'plugin-lib', custom: true};
163 226
                 android.framework.install(framework, dummyPluginInfo, dummyProject);
164 227
                 expect(dummyProject.addSubProject).toHaveBeenCalledWith(dummyProject.projectDir, someString);
165 228
                 expect(copyNewFileSpy).toHaveBeenCalledWith(dummyPluginInfo.dir, framework.src, dummyProject.projectDir, someString, false);
166 229
             });
167 230
 
168
-            it('Test#013 : should install gradleReference using project.addGradleReference', function () {
231
+            it('Test#012 : should install gradleReference using project.addGradleReference', function () {
169 232
                 var framework = {src: 'plugin-lib', custom: true, type: 'gradleReference'};
170 233
                 android.framework.install(framework, dummyPluginInfo, dummyProject);
171 234
                 expect(copyNewFileSpy).toHaveBeenCalledWith(dummyPluginInfo.dir, framework.src, dummyProject.projectDir, someString, false);
@@ -183,13 +246,13 @@ describe('android project handler', function () {
183 246
                 platformWwwDest = path.resolve(dummyProject.platformWww, 'plugins', dummyPluginInfo.id, jsModule.src);
184 247
             });
185 248
 
186
-            it('Test#014 : should put module to both www and platform_www when options.usePlatformWww flag is specified', function () {
249
+            it('Test#013 : should put module to both www and platform_www when options.usePlatformWww flag is specified', function () {
187 250
                 android['js-module'].install(jsModule, dummyPluginInfo, dummyProject, {usePlatformWww: true});
188 251
                 expect(fs.writeFileSync).toHaveBeenCalledWith(wwwDest, jasmine.any(String), 'utf-8');
189 252
                 expect(fs.writeFileSync).toHaveBeenCalledWith(platformWwwDest, jasmine.any(String), 'utf-8');
190 253
             });
191 254
 
192
-            it('Test#015 : should put module to www only when options.usePlatformWww flag is not specified', function () {
255
+            it('Test#014 : should put module to www only when options.usePlatformWww flag is not specified', function () {
193 256
                 android['js-module'].install(jsModule, dummyPluginInfo, dummyProject);
194 257
                 expect(fs.writeFileSync).toHaveBeenCalledWith(wwwDest, jasmine.any(String), 'utf-8');
195 258
                 expect(fs.writeFileSync).not.toHaveBeenCalledWith(platformWwwDest, jasmine.any(String), 'utf-8');
@@ -206,13 +269,13 @@ describe('android project handler', function () {
206 269
                 platformWwwDest = path.resolve(dummyProject.platformWww, asset.target);
207 270
             });
208 271
 
209
-            it('Test#016 : should put asset to both www and platform_www when options.usePlatformWww flag is specified', function () {
272
+            it('Test#015 : should put asset to both www and platform_www when options.usePlatformWww flag is specified', function () {
210 273
                 android.asset.install(asset, dummyPluginInfo, dummyProject, {usePlatformWww: true});
211 274
                 expect(copyFileSpy).toHaveBeenCalledWith(dummyPluginInfo.dir, asset.src, dummyProject.www, asset.target);
212 275
                 expect(copyFileSpy).toHaveBeenCalledWith(dummyPluginInfo.dir, asset.src, dummyProject.platformWww, asset.target);
213 276
             });
214 277
 
215
-            it('Test#017 : should put asset to www only when options.usePlatformWww flag is not specified', function () {
278
+            it('Test#016 : should put asset to www only when options.usePlatformWww flag is not specified', function () {
216 279
                 android.asset.install(asset, dummyPluginInfo, dummyProject);
217 280
                 expect(copyFileSpy).toHaveBeenCalledWith(dummyPluginInfo.dir, asset.src, dummyProject.www, asset.target);
218 281
                 expect(copyFileSpy).not.toHaveBeenCalledWith(dummyPluginInfo.dir, asset.src, dummyProject.platformWww, asset.target);
@@ -232,7 +295,7 @@ describe('android project handler', function () {
232 295
         beforeEach(function () {
233 296
             shell.mkdir('-p', temp);
234 297
             shell.mkdir('-p', plugins_dir);
235
-            shell.cp('-rf', android_project, temp);
298
+            shell.cp('-rf', android_studio_project, temp);
236 299
             AndroidProject.purgeCache();
237 300
             dummyProject = AndroidProject.getProjectFile(temp);
238 301
             common.__set__('removeFile', removeFileSpy);
@@ -246,12 +309,7 @@ describe('android project handler', function () {
246 309
         });
247 310
 
248 311
         describe('of <lib-file> elements', function () {
249
-            it('Test#018 : should remove jar files', function () {
250
-                android['lib-file'].install(valid_libs[0], dummyPluginInfo, dummyProject);
251
-                android['lib-file'].uninstall(valid_libs[0], dummyPluginInfo, dummyProject);
252
-                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('libs/TestLib.jar'));
253
-            });
254
-            it('Test#019 : should remove jar files for Android Studio projects', function () {
312
+            it('Test#017 : should remove jar files for Android Studio projects', function () {
255 313
                 android['lib-file'].install(valid_libs[0], dummyPluginInfo, dummyProject, {android_studio: true});
256 314
                 android['lib-file'].uninstall(valid_libs[0], dummyPluginInfo, dummyProject, {android_studio: true});
257 315
                 expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/libs/TestLib.jar'));
@@ -259,12 +317,7 @@ describe('android project handler', function () {
259 317
         });
260 318
 
261 319
         describe('of <resource-file> elements', function () {
262
-            it('Test#020 : should remove files', function () {
263
-                android['resource-file'].install(valid_resources[0], dummyPluginInfo, dummyProject);
264
-                android['resource-file'].uninstall(valid_resources[0], dummyPluginInfo, dummyProject);
265
-                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('res/xml/dummy.xml'));
266
-            });
267
-            it('Test#021 : should remove files for Android Studio projects', function () {
320
+            it('Test#018 : should remove files for Android Studio projects', function () {
268 321
                 android['resource-file'].install(valid_resources[0], dummyPluginInfo, dummyProject, {android_studio: true});
269 322
                 android['resource-file'].uninstall(valid_resources[0], dummyPluginInfo, dummyProject, {android_studio: true});
270 323
                 expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/xml/dummy.xml'));
@@ -272,16 +325,71 @@ describe('android project handler', function () {
272 325
         });
273 326
 
274 327
         describe('of <source-file> elements', function () {
275
-            it('Test#022 : should remove stuff by calling common.deleteJava', function () {
276
-                android['source-file'].install(valid_source[0], dummyPluginInfo, dummyProject);
277
-                android['source-file'].uninstall(valid_source[0], dummyPluginInfo, dummyProject);
278
-                expect(deleteJavaSpy).toHaveBeenCalledWith(temp, path.join('src/com/phonegap/plugins/dummyplugin/DummyPlugin.java'));
279
-            });
280
-            it('Test#023 : should remove stuff by calling common.deleteJava for Android Studio projects', function () {
328
+            it('Test#019 : should remove stuff by calling common.deleteJava for Android Studio projects', function () {
281 329
                 android['source-file'].install(valid_source[0], dummyPluginInfo, dummyProject, {android_studio: true});
282 330
                 android['source-file'].uninstall(valid_source[0], dummyPluginInfo, dummyProject, {android_studio: true});
283 331
                 expect(deleteJavaSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/java/com/phonegap/plugins/dummyplugin/DummyPlugin.java'));
284 332
             });
333
+
334
+            it('Test#019a : should remove stuff by calling common.deleteJava for Android Studio projects, with specific app target-dir', function () {
335
+                android['source-file'].install(valid_source[1], dummyPluginInfo, dummyProject, {android_studio: true});
336
+                android['source-file'].uninstall(valid_source[1], dummyPluginInfo, dummyProject, {android_studio: true});
337
+                expect(deleteJavaSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/src/com/phonegap/plugins/dummyplugin/DummyPlugin2.java'));
338
+            });
339
+
340
+            it('Test#019b : should remove stuff by calling common.removeFile for Android Studio projects, of jar with new app target-dir scheme', function () {
341
+                android['source-file'].install(valid_source[2], dummyPluginInfo, dummyProject, {android_studio: true});
342
+                android['source-file'].uninstall(valid_source[2], dummyPluginInfo, dummyProject, {android_studio: true});
343
+                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/libs/TestLib.jar'));
344
+            });
345
+
346
+            it('Test#019c : should remove stuff by calling common.removeFile for Android Studio projects, of aar with new app target-dir scheme', function () {
347
+                android['source-file'].install(valid_source[3], dummyPluginInfo, dummyProject, {android_studio: true});
348
+                android['source-file'].uninstall(valid_source[3], dummyPluginInfo, dummyProject, {android_studio: true});
349
+                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/libs/TestAar.aar'));
350
+            });
351
+
352
+            it('Test#019d : should remove stuff by calling common.removeFile for Android Studio projects, of xml with old target-dir scheme', function () {
353
+                android['source-file'].install(valid_source[4], dummyPluginInfo, dummyProject, {android_studio: true});
354
+                android['source-file'].uninstall(valid_source[4], dummyPluginInfo, dummyProject, {android_studio: true});
355
+                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/xml/mysettings.xml'));
356
+            });
357
+
358
+            it('Test#019e : should remove stuff by calling common.removeFile for Android Studio projects, of file with other extension with old target-dir scheme', function () {
359
+                android['source-file'].install(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
360
+                android['source-file'].uninstall(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
361
+                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/values/other.extension'));
362
+            });
363
+
364
+            it('Test#019f : should remove stuff by calling common.removeFile for Android Studio projects, of aidl with old target-dir scheme (GH-547)', function () {
365
+                android['source-file'].install(valid_source[6], dummyPluginInfo, dummyProject, {android_studio: true});
366
+                android['source-file'].uninstall(valid_source[6], dummyPluginInfo, dummyProject, {android_studio: true});
367
+                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/aidl/com/mytest/myapi.aidl'));
368
+            });
369
+
370
+            it('Test#019g : should remove stuff by calling common.removeFile for Android Studio projects, of aar with old target-dir scheme (GH-547)', function () {
371
+                android['source-file'].install(valid_source[7], dummyPluginInfo, dummyProject, {android_studio: true});
372
+                android['source-file'].uninstall(valid_source[7], dummyPluginInfo, dummyProject, {android_studio: true});
373
+                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/libs/testaar2.aar'));
374
+            });
375
+
376
+            it('Test#019h : should remove stuff by calling common.removeFile for Android Studio projects, of jar with old target-dir scheme (GH-547)', function () {
377
+                android['source-file'].install(valid_source[8], dummyPluginInfo, dummyProject, {android_studio: true});
378
+                android['source-file'].uninstall(valid_source[8], dummyPluginInfo, dummyProject, {android_studio: true});
379
+                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/libs/testjar2.jar'));
380
+            });
381
+
382
+            it('Test#019i : should remove stuff by calling common.removeFile for Android Studio projects, of .so lib file with old target-dir scheme (GH-547)', function () {
383
+                android['source-file'].install(valid_source[9], dummyPluginInfo, dummyProject, {android_studio: true});
384
+                android['source-file'].uninstall(valid_source[9], dummyPluginInfo, dummyProject, {android_studio: true});
385
+                expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/jniLibs/x86/libnative.so'));
386
+            });
387
+
388
+            it('Test#019j : should remove stuff by calling common.deleteJava for Android Studio projects, with target-dir that includes "app"', function () {
389
+                android['source-file'].install(valid_source[10], dummyPluginInfo, dummyProject, {android_studio: true});
390
+                android['source-file'].uninstall(valid_source[10], dummyPluginInfo, dummyProject, {android_studio: true});
391
+                expect(deleteJavaSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/java/com/appco/DummyPlugin2.java'));
392
+            });
285 393
         });
286 394
 
287 395
         describe('of <framework> elements', function () {
@@ -296,30 +404,30 @@ describe('android project handler', function () {
296 404
                 spyOn(dummyProject, 'removeGradleReference');
297 405
             });
298 406
 
299
-            it('Test#024 : should throw if framework doesn\'t have "src" attribute', function () {
407
+            it('Test#020 : should throw if framework doesn\'t have "src" attribute', function () {
300 408
                 expect(function () { android.framework.uninstall({}, dummyPluginInfo, dummyProject); }).toThrow();
301 409
             });
302 410
 
303
-            it('Test#025 : should uninstall framework without "parent" attribute into project root', function () {
411
+            it('Test#021 : should uninstall framework without "parent" attribute into project root', function () {
304 412
                 var framework = {src: 'plugin-lib'};
305 413
                 android.framework.uninstall(framework, dummyPluginInfo, dummyProject);
306 414
                 expect(dummyProject.removeSystemLibrary).toHaveBeenCalledWith(dummyProject.projectDir, someString);
307 415
             });
308 416
 
309
-            it('Test#026 : should uninstall framework with "parent" attribute into parent framework dir', function () {
417
+            it('Test#022 : should uninstall framework with "parent" attribute into parent framework dir', function () {
310 418
                 var childFramework = {src: 'plugin-lib2', parent: 'plugin-lib'};
311 419
                 android.framework.uninstall(childFramework, dummyPluginInfo, dummyProject);
312 420
                 expect(dummyProject.removeSystemLibrary).toHaveBeenCalledWith(path.resolve(dummyProject.projectDir, childFramework.parent), someString);
313 421
             });
314 422
 
315
-            it('Test#027 : should remove framework sources if "custom" attribute is set', function () {
423
+            it('Test#023 : should remove framework sources if "custom" attribute is set', function () {
316 424
                 var framework = {src: 'plugin-lib', custom: true};
317 425
                 android.framework.uninstall(framework, dummyPluginInfo, dummyProject);
318 426
                 expect(dummyProject.removeSubProject).toHaveBeenCalledWith(dummyProject.projectDir, someString);
319 427
                 expect(removeFileSpy).toHaveBeenCalledWith(dummyProject.projectDir, someString);
320 428
             });
321 429
 
322
-            it('Test#28 : should install gradleReference using project.removeGradleReference', function () {
430
+            it('Test#24 : should install gradleReference using project.removeGradleReference', function () {
323 431
                 var framework = {src: 'plugin-lib', custom: true, type: 'gradleReference'};
324 432
                 android.framework.uninstall(framework, dummyPluginInfo, dummyProject);
325 433
                 expect(removeFileSpy).toHaveBeenCalledWith(dummyProject.projectDir, someString);
@@ -345,13 +453,13 @@ describe('android project handler', function () {
345 453
                 });
346 454
             });
347 455
 
348
-            it('Test#029 : should put module to both www and platform_www when options.usePlatformWww flag is specified', function () {
456
+            it('Test#025 : should put module to both www and platform_www when options.usePlatformWww flag is specified', function () {
349 457
                 android['js-module'].uninstall(jsModule, dummyPluginInfo, dummyProject, {usePlatformWww: true});
350 458
                 expect(shell.rm).toHaveBeenCalledWith('-Rf', wwwDest);
351 459
                 expect(shell.rm).toHaveBeenCalledWith('-Rf', platformWwwDest);
352 460
             });
353 461
 
354
-            it('Test#030 : should put module to www only when options.usePlatformWww flag is not specified', function () {
462
+            it('Test#026 : should put module to www only when options.usePlatformWww flag is not specified', function () {
355 463
                 android['js-module'].uninstall(jsModule, dummyPluginInfo, dummyProject);
356 464
                 expect(shell.rm).toHaveBeenCalledWith('-Rf', wwwDest);
357 465
                 expect(shell.rm).not.toHaveBeenCalledWith('-Rf', platformWwwDest);
@@ -375,13 +483,13 @@ describe('android project handler', function () {
375 483
                 });
376 484
             });
377 485
 
378
-            it('Test#031 : should put module to both www and platform_www when options.usePlatformWww flag is specified', function () {
486
+            it('Test#027 : should put module to both www and platform_www when options.usePlatformWww flag is specified', function () {
379 487
                 android.asset.uninstall(asset, dummyPluginInfo, dummyProject, {usePlatformWww: true});
380 488
                 expect(shell.rm).toHaveBeenCalledWith(jasmine.any(String), wwwDest);
381 489
                 expect(shell.rm).toHaveBeenCalledWith(jasmine.any(String), platformWwwDest);
382 490
             });
383 491
 
384
-            it('Test#032 : should put module to www only when options.usePlatformWww flag is not specified', function () {
492
+            it('Test#028 : should put module to www only when options.usePlatformWww flag is not specified', function () {
385 493
                 android.asset.uninstall(asset, dummyPluginInfo, dummyProject);
386 494
                 expect(shell.rm).toHaveBeenCalledWith(jasmine.any(String), wwwDest);
387 495
                 expect(shell.rm).not.toHaveBeenCalledWith(jasmine.any(String), platformWwwDest);

+ 668
- 8
package-lock.json View File

@@ -5,16 +5,16 @@
5 5
     "requires": true,
6 6
     "dependencies": {
7 7
         "cordova-android": {
8
-            "version": "7.1.1",
9
-            "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.1.tgz",
10
-            "integrity": "sha512-MAOwEMT3TuGjKw4McNzzYyHmxkWY3ozafbIgdMAvPzqSBVGIcn+H3SmWfaHtUXfmIPFliT171ICsSm6W5lZXEA==",
8
+            "version": "7.1.4",
9
+            "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.4.tgz",
10
+            "integrity": "sha512-Rtvu002I83uzfVyCsE6p2krFKVHt9TSAqZUATes+zH+o9cdxYGrLHY+PKCQo4SLCdSMdrkIHCDnQPTYTp/d7+g==",
11 11
             "requires": {
12 12
                 "abbrev": "*",
13
-                "android-versions": "1.3.0",
13
+                "android-versions": "1.4.0",
14 14
                 "ansi": "*",
15 15
                 "balanced-match": "*",
16 16
                 "base64-js": "1.2.0",
17
-                "big-integer": "*",
17
+                "big-integer": "1.6.32",
18 18
                 "bplist-parser": "*",
19 19
                 "brace-expansion": "*",
20 20
                 "concat-map": "*",
@@ -27,12 +27,12 @@
27 27
                 "minimatch": "*",
28 28
                 "nopt": "3.0.1",
29 29
                 "once": "*",
30
-                "path-is-absolute": "*",
30
+                "path-is-absolute": "1.0.1",
31 31
                 "plist": "2.1.0",
32 32
                 "properties-parser": "0.2.3",
33 33
                 "q": "1.4.1",
34 34
                 "sax": "0.3.5",
35
-                "semver": "*",
35
+                "semver": "5.5.0",
36 36
                 "shelljs": "0.5.3",
37 37
                 "underscore": "*",
38 38
                 "unorm": "*",
@@ -46,7 +46,7 @@
46 46
                     "bundled": true
47 47
                 },
48 48
                 "android-versions": {
49
-                    "version": "1.3.0",
49
+                    "version": "1.4.0",
50 50
                     "bundled": true,
51 51
                     "requires": {
52 52
                         "semver": "^5.4.1"
@@ -214,6 +214,661 @@
214 214
                 }
215 215
             }
216 216
         },
217
+        "cordova-browser": {
218
+            "version": "5.0.4",
219
+            "resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-5.0.4.tgz",
220
+            "integrity": "sha512-EDuG+9NGsaYpNSY6wF0kR34m1m38V+nRglGXxQ609fgMYrMHEYR2lg38nDr1Os4qeF0LJz8UQ7nq7Y+idg6Aig==",
221
+            "requires": {
222
+                "abbrev": "*",
223
+                "accepts": "*",
224
+                "ansi": "*",
225
+                "ansi-regex": "2.1.1",
226
+                "ansi-styles": "2.2.1",
227
+                "array-flatten": "1.1.1",
228
+                "balanced-match": "*",
229
+                "base64-js": "1.2.0",
230
+                "big-integer": "*",
231
+                "body-parser": "1.18.2",
232
+                "bplist-parser": "*",
233
+                "brace-expansion": "*",
234
+                "bytes": "*",
235
+                "chalk": "1.1.3",
236
+                "compressible": "*",
237
+                "compression": "1.7.2",
238
+                "concat-map": "*",
239
+                "content-disposition": "*",
240
+                "content-type": "*",
241
+                "cookie": "*",
242
+                "cookie-signature": "1.0.6",
243
+                "cordova-common": "2.2.5",
244
+                "cordova-registry-mapper": "*",
245
+                "cordova-serve": "2.0.1",
246
+                "debug": "2.6.9",
247
+                "depd": "*",
248
+                "destroy": "*",
249
+                "ee-first": "*",
250
+                "elementtree": "0.1.6",
251
+                "encodeurl": "*",
252
+                "escape-html": "*",
253
+                "escape-string-regexp": "*",
254
+                "etag": "*",
255
+                "express": "*",
256
+                "finalhandler": "*",
257
+                "forwarded": "*",
258
+                "fresh": "*",
259
+                "glob": "5.0.15",
260
+                "has-ansi": "2.0.0",
261
+                "http-errors": "1.6.3",
262
+                "iconv-lite": "0.4.19",
263
+                "inflight": "*",
264
+                "inherits": "*",
265
+                "ipaddr.js": "1.6.0",
266
+                "is-wsl": "*",
267
+                "media-typer": "*",
268
+                "merge-descriptors": "*",
269
+                "methods": "*",
270
+                "mime": "1.4.1",
271
+                "mime-db": "1.33.0",
272
+                "mime-types": "2.1.18",
273
+                "minimatch": "*",
274
+                "ms": "2.0.0",
275
+                "negotiator": "*",
276
+                "nopt": "3.0.6",
277
+                "on-finished": "*",
278
+                "on-headers": "*",
279
+                "once": "*",
280
+                "opn": "*",
281
+                "parseurl": "*",
282
+                "path-is-absolute": "*",
283
+                "path-to-regexp": "0.1.7",
284
+                "plist": "2.1.0",
285
+                "proxy-addr": "2.0.3",
286
+                "q": "*",
287
+                "qs": "6.5.1",
288
+                "range-parser": "*",
289
+                "raw-body": "2.3.2",
290
+                "safe-buffer": "5.1.1",
291
+                "sax": "0.3.5",
292
+                "send": "*",
293
+                "serve-static": "*",
294
+                "setprototypeof": "*",
295
+                "shelljs": "0.5.3",
296
+                "statuses": "1.4.0",
297
+                "strip-ansi": "3.0.1",
298
+                "supports-color": "2.0.0",
299
+                "type-is": "*",
300
+                "underscore": "*",
301
+                "unorm": "*",
302
+                "unpipe": "*",
303
+                "utils-merge": "*",
304
+                "vary": "*",
305
+                "wrappy": "*",
306
+                "xmlbuilder": "8.2.2",
307
+                "xmldom": "*"
308
+            },
309
+            "dependencies": {
310
+                "abbrev": {
311
+                    "version": "1.1.1",
312
+                    "bundled": true
313
+                },
314
+                "accepts": {
315
+                    "version": "1.3.5",
316
+                    "bundled": true,
317
+                    "requires": {
318
+                        "mime-types": "~2.1.18",
319
+                        "negotiator": "0.6.1"
320
+                    }
321
+                },
322
+                "ansi": {
323
+                    "version": "0.3.1",
324
+                    "bundled": true
325
+                },
326
+                "ansi-regex": {
327
+                    "version": "2.1.1",
328
+                    "bundled": true
329
+                },
330
+                "ansi-styles": {
331
+                    "version": "2.2.1",
332
+                    "bundled": true
333
+                },
334
+                "array-flatten": {
335
+                    "version": "1.1.1",
336
+                    "bundled": true
337
+                },
338
+                "balanced-match": {
339
+                    "version": "1.0.0",
340
+                    "bundled": true
341
+                },
342
+                "base64-js": {
343
+                    "version": "1.2.0",
344
+                    "bundled": true
345
+                },
346
+                "big-integer": {
347
+                    "version": "1.6.32",
348
+                    "bundled": true
349
+                },
350
+                "body-parser": {
351
+                    "version": "1.18.2",
352
+                    "bundled": true,
353
+                    "requires": {
354
+                        "bytes": "3.0.0",
355
+                        "content-type": "~1.0.4",
356
+                        "debug": "2.6.9",
357
+                        "depd": "~1.1.1",
358
+                        "http-errors": "~1.6.2",
359
+                        "iconv-lite": "0.4.19",
360
+                        "on-finished": "~2.3.0",
361
+                        "qs": "6.5.1",
362
+                        "raw-body": "2.3.2",
363
+                        "type-is": "~1.6.15"
364
+                    }
365
+                },
366
+                "bplist-parser": {
367
+                    "version": "0.1.1",
368
+                    "bundled": true,
369
+                    "requires": {
370
+                        "big-integer": "^1.6.7"
371
+                    }
372
+                },
373
+                "brace-expansion": {
374
+                    "version": "1.1.11",
375
+                    "bundled": true,
376
+                    "requires": {
377
+                        "balanced-match": "^1.0.0",
378
+                        "concat-map": "0.0.1"
379
+                    }
380
+                },
381
+                "bytes": {
382
+                    "version": "3.0.0",
383
+                    "bundled": true
384
+                },
385
+                "chalk": {
386
+                    "version": "1.1.3",
387
+                    "bundled": true,
388
+                    "requires": {
389
+                        "ansi-styles": "^2.2.1",
390
+                        "escape-string-regexp": "^1.0.2",
391
+                        "has-ansi": "^2.0.0",
392
+                        "strip-ansi": "^3.0.0",
393
+                        "supports-color": "^2.0.0"
394
+                    }
395
+                },
396
+                "compressible": {
397
+                    "version": "2.0.14",
398
+                    "bundled": true,
399
+                    "requires": {
400
+                        "mime-db": ">= 1.34.0 < 2"
401
+                    },
402
+                    "dependencies": {
403
+                        "mime-db": {
404
+                            "version": "1.34.0",
405
+                            "bundled": true
406
+                        }
407
+                    }
408
+                },
409
+                "compression": {
410
+                    "version": "1.7.2",
411
+                    "bundled": true,
412
+                    "requires": {
413
+                        "accepts": "~1.3.4",
414
+                        "bytes": "3.0.0",
415
+                        "compressible": "~2.0.13",
416
+                        "debug": "2.6.9",
417
+                        "on-headers": "~1.0.1",
418
+                        "safe-buffer": "5.1.1",
419
+                        "vary": "~1.1.2"
420
+                    }
421
+                },
422
+                "concat-map": {
423
+                    "version": "0.0.1",
424
+                    "bundled": true
425
+                },
426
+                "content-disposition": {
427
+                    "version": "0.5.2",
428
+                    "bundled": true
429
+                },
430
+                "content-type": {
431
+                    "version": "1.0.4",
432
+                    "bundled": true
433
+                },
434
+                "cookie": {
435
+                    "version": "0.3.1",
436
+                    "bundled": true
437
+                },
438
+                "cookie-signature": {
439
+                    "version": "1.0.6",
440
+                    "bundled": true
441
+                },
442
+                "cordova-common": {
443
+                    "version": "2.2.5",
444
+                    "bundled": true,
445
+                    "requires": {
446
+                        "ansi": "^0.3.1",
447
+                        "bplist-parser": "^0.1.0",
448
+                        "cordova-registry-mapper": "^1.1.8",
449
+                        "elementtree": "0.1.6",
450
+                        "glob": "^5.0.13",
451
+                        "minimatch": "^3.0.0",
452
+                        "plist": "^2.1.0",
453
+                        "q": "^1.4.1",
454
+                        "shelljs": "^0.5.3",
455
+                        "underscore": "^1.8.3",
456
+                        "unorm": "^1.3.3"
457
+                    }
458
+                },
459
+                "cordova-registry-mapper": {
460
+                    "version": "1.1.15",
461
+                    "bundled": true
462
+                },
463
+                "cordova-serve": {
464
+                    "version": "2.0.1",
465
+                    "bundled": true,
466
+                    "requires": {
467
+                        "chalk": "^1.1.1",
468
+                        "compression": "^1.6.0",
469
+                        "express": "^4.13.3",
470
+                        "opn": "^5.3.0",
471
+                        "shelljs": "^0.5.3"
472
+                    }
473
+                },
474
+                "debug": {
475
+                    "version": "2.6.9",
476
+                    "bundled": true,
477
+                    "requires": {
478
+                        "ms": "2.0.0"
479
+                    }
480
+                },
481
+                "depd": {
482
+                    "version": "1.1.2",
483
+                    "bundled": true
484
+                },
485
+                "destroy": {
486
+                    "version": "1.0.4",
487
+                    "bundled": true
488
+                },
489
+                "ee-first": {
490
+                    "version": "1.1.1",
491
+                    "bundled": true
492
+                },
493
+                "elementtree": {
494
+                    "version": "0.1.6",
495
+                    "bundled": true,
496
+                    "requires": {
497
+                        "sax": "0.3.5"
498
+                    }
499
+                },
500
+                "encodeurl": {
501
+                    "version": "1.0.2",
502
+                    "bundled": true
503
+                },
504
+                "escape-html": {
505
+                    "version": "1.0.3",
506
+                    "bundled": true
507
+                },
508
+                "escape-string-regexp": {
509
+                    "version": "1.0.5",
510
+                    "bundled": true
511
+                },
512
+                "etag": {
513
+                    "version": "1.8.1",
514
+                    "bundled": true
515
+                },
516
+                "express": {
517
+                    "version": "4.16.3",
518
+                    "bundled": true,
519
+                    "requires": {
520
+                        "accepts": "~1.3.5",
521
+                        "array-flatten": "1.1.1",
522
+                        "body-parser": "1.18.2",
523
+                        "content-disposition": "0.5.2",
524
+                        "content-type": "~1.0.4",
525
+                        "cookie": "0.3.1",
526
+                        "cookie-signature": "1.0.6",
527
+                        "debug": "2.6.9",
528
+                        "depd": "~1.1.2",
529
+                        "encodeurl": "~1.0.2",
530
+                        "escape-html": "~1.0.3",
531
+                        "etag": "~1.8.1",
532
+                        "finalhandler": "1.1.1",
533
+                        "fresh": "0.5.2",
534
+                        "merge-descriptors": "1.0.1",
535
+                        "methods": "~1.1.2",
536
+                        "on-finished": "~2.3.0",
537
+                        "parseurl": "~1.3.2",
538
+                        "path-to-regexp": "0.1.7",
539
+                        "proxy-addr": "~2.0.3",
540
+                        "qs": "6.5.1",
541
+                        "range-parser": "~1.2.0",
542
+                        "safe-buffer": "5.1.1",
543
+                        "send": "0.16.2",
544
+                        "serve-static": "1.13.2",
545
+                        "setprototypeof": "1.1.0",
546
+                        "statuses": "~1.4.0",
547
+                        "type-is": "~1.6.16",
548
+                        "utils-merge": "1.0.1",
549
+                        "vary": "~1.1.2"
550
+                    }
551
+                },
552
+                "finalhandler": {
553
+                    "version": "1.1.1",
554
+                    "bundled": true,
555
+                    "requires": {
556
+                        "debug": "2.6.9",
557
+                        "encodeurl": "~1.0.2",
558
+                        "escape-html": "~1.0.3",
559
+                        "on-finished": "~2.3.0",
560
+                        "parseurl": "~1.3.2",
561
+                        "statuses": "~1.4.0",
562
+                        "unpipe": "~1.0.0"
563
+                    }
564
+                },
565
+                "forwarded": {
566
+                    "version": "0.1.2",
567
+                    "bundled": true
568
+                },
569
+                "fresh": {
570
+                    "version": "0.5.2",
571
+                    "bundled": true
572
+                },
573
+                "glob": {
574
+                    "version": "5.0.15",
575
+                    "bundled": true,
576
+                    "requires": {
577
+                        "inflight": "^1.0.4",
578
+                        "inherits": "2",
579
+                        "minimatch": "2 || 3",
580
+                        "once": "^1.3.0",
581
+                        "path-is-absolute": "^1.0.0"
582
+                    }
583
+                },
584
+                "has-ansi": {
585
+                    "version": "2.0.0",
586
+                    "bundled": true,
587
+                    "requires": {
588
+                        "ansi-regex": "^2.0.0"
589
+                    }
590
+                },
591
+                "http-errors": {
592
+                    "version": "1.6.3",
593
+                    "bundled": true,
594
+                    "requires": {
595
+                        "depd": "~1.1.2",
596
+                        "inherits": "2.0.3",
597
+                        "setprototypeof": "1.1.0",
598
+                        "statuses": ">= 1.4.0 < 2"
599
+                    }
600
+                },
601
+                "iconv-lite": {
602
+                    "version": "0.4.19",
603
+                    "bundled": true
604
+                },
605
+                "inflight": {
606
+                    "version": "1.0.6",
607
+                    "bundled": true,
608
+                    "requires": {
609
+                        "once": "^1.3.0",
610
+                        "wrappy": "1"
611
+                    }
612
+                },
613
+                "inherits": {
614
+                    "version": "2.0.3",
615
+                    "bundled": true
616
+                },
617
+                "ipaddr.js": {
618
+                    "version": "1.6.0",
619
+                    "bundled": true
620
+                },
621
+                "is-wsl": {
622
+                    "version": "1.1.0",
623
+                    "bundled": true
624
+                },
625
+                "media-typer": {
626
+                    "version": "0.3.0",
627
+                    "bundled": true
628
+                },
629
+                "merge-descriptors": {
630
+                    "version": "1.0.1",
631
+                    "bundled": true
632
+                },
633
+                "methods": {
634
+                    "version": "1.1.2",
635
+                    "bundled": true
636
+                },
637
+                "mime": {
638
+                    "version": "1.4.1",
639
+                    "bundled": true
640
+                },
641
+                "mime-db": {
642
+                    "version": "1.33.0",
643
+                    "bundled": true
644
+                },
645
+                "mime-types": {
646
+                    "version": "2.1.18",
647
+                    "bundled": true,
648
+                    "requires": {
649
+                        "mime-db": "~1.33.0"
650
+                    }
651
+                },
652
+                "minimatch": {
653
+                    "version": "3.0.4",
654
+                    "bundled": true,
655
+                    "requires": {
656
+                        "brace-expansion": "^1.1.7"
657
+                    }
658
+                },
659
+                "ms": {
660
+                    "version": "2.0.0",
661
+                    "bundled": true
662
+                },
663
+                "negotiator": {
664
+                    "version": "0.6.1",
665
+                    "bundled": true
666
+                },
667
+                "nopt": {
668
+                    "version": "3.0.6",
669
+                    "bundled": true,
670
+                    "requires": {
671
+                        "abbrev": "1"
672
+                    }
673
+                },
674
+                "on-finished": {
675
+                    "version": "2.3.0",
676
+                    "bundled": true,
677
+                    "requires": {
678
+                        "ee-first": "1.1.1"
679
+                    }
680
+                },
681
+                "on-headers": {
682
+                    "version": "1.0.1",
683
+                    "bundled": true
684
+                },
685
+                "once": {
686
+                    "version": "1.4.0",
687
+                    "bundled": true,
688
+                    "requires": {
689
+                        "wrappy": "1"
690
+                    }
691
+                },
692
+                "opn": {
693
+                    "version": "5.3.0",
694
+                    "bundled": true,
695
+                    "requires": {
696
+                        "is-wsl": "^1.1.0"
697
+                    }
698
+                },
699
+                "parseurl": {
700
+                    "version": "1.3.2",
701
+                    "bundled": true
702
+                },
703
+                "path-is-absolute": {
704
+                    "version": "1.0.1",
705
+                    "bundled": true
706
+                },
707
+                "path-to-regexp": {
708
+                    "version": "0.1.7",
709
+                    "bundled": true
710
+                },
711
+                "plist": {
712
+                    "version": "2.1.0",
713
+                    "bundled": true,
714
+                    "requires": {
715
+                        "base64-js": "1.2.0",
716
+                        "xmlbuilder": "8.2.2",
717
+                        "xmldom": "0.1.x"
718
+                    }
719
+                },
720
+                "proxy-addr": {
721
+                    "version": "2.0.3",
722
+                    "bundled": true,
723
+                    "requires": {
724
+                        "forwarded": "~0.1.2",
725
+                        "ipaddr.js": "1.6.0"
726
+                    }
727
+                },
728
+                "q": {
729
+                    "version": "1.5.1",
730
+                    "bundled": true
731
+                },
732
+                "qs": {
733
+                    "version": "6.5.1",
734
+                    "bundled": true
735
+                },
736
+                "range-parser": {
737
+                    "version": "1.2.0",
738
+                    "bundled": true
739
+                },
740
+                "raw-body": {
741
+                    "version": "2.3.2",
742
+                    "bundled": true,
743
+                    "requires": {
744
+                        "bytes": "3.0.0",
745
+                        "http-errors": "1.6.2",
746
+                        "iconv-lite": "0.4.19",
747
+                        "unpipe": "1.0.0"
748
+                    },
749
+                    "dependencies": {
750
+                        "depd": {
751
+                            "version": "1.1.1",
752
+                            "bundled": true
753
+                        },
754
+                        "http-errors": {
755
+                            "version": "1.6.2",
756
+                            "bundled": true,
757
+                            "requires": {
758
+                                "depd": "1.1.1",
759
+                                "inherits": "2.0.3",
760
+                                "setprototypeof": "1.0.3",
761
+                                "statuses": ">= 1.3.1 < 2"
762
+                            }
763
+                        },
764
+                        "setprototypeof": {
765
+                            "version": "1.0.3",
766
+                            "bundled": true
767
+                        }
768
+                    }
769
+                },
770
+                "safe-buffer": {
771
+                    "version": "5.1.1",
772
+                    "bundled": true
773
+                },
774
+                "sax": {
775
+                    "version": "0.3.5",
776
+                    "bundled": true
777
+                },
778
+                "send": {
779
+                    "version": "0.16.2",
780
+                    "bundled": true,
781
+                    "requires": {
782
+                        "debug": "2.6.9",
783
+                        "depd": "~1.1.2",
784
+                        "destroy": "~1.0.4",
785
+                        "encodeurl": "~1.0.2",
786
+                        "escape-html": "~1.0.3",
787
+                        "etag": "~1.8.1",
788
+                        "fresh": "0.5.2",
789
+                        "http-errors": "~1.6.2",
790
+                        "mime": "1.4.1",
791
+                        "ms": "2.0.0",
792
+                        "on-finished": "~2.3.0",
793
+                        "range-parser": "~1.2.0",
794
+                        "statuses": "~1.4.0"
795
+                    }
796
+                },
797
+                "serve-static": {
798
+                    "version": "1.13.2",
799
+                    "bundled": true,
800
+                    "requires": {
801
+                        "encodeurl": "~1.0.2",
802
+                        "escape-html": "~1.0.3",
803
+                        "parseurl": "~1.3.2",
804
+                        "send": "0.16.2"
805
+                    }
806
+                },
807
+                "setprototypeof": {
808
+                    "version": "1.1.0",
809
+                    "bundled": true
810
+                },
811
+                "shelljs": {
812
+                    "version": "0.5.3",
813
+                    "bundled": true
814
+                },
815
+                "statuses": {
816
+                    "version": "1.4.0",
817
+                    "bundled": true
818
+                },
819
+                "strip-ansi": {
820
+                    "version": "3.0.1",
821
+                    "bundled": true,
822
+                    "requires": {
823
+                        "ansi-regex": "^2.0.0"
824
+                    }
825
+                },
826
+                "supports-color": {
827
+                    "version": "2.0.0",
828
+                    "bundled": true
829
+                },
830
+                "type-is": {
831
+                    "version": "1.6.16",
832
+                    "bundled": true,
833
+                    "requires": {
834
+                        "media-typer": "0.3.0",
835
+                        "mime-types": "~2.1.18"
836
+                    }
837
+                },
838
+                "underscore": {
839
+                    "version": "1.9.1",
840
+                    "bundled": true
841
+                },
842
+                "unorm": {
843
+                    "version": "1.4.1",
844
+                    "bundled": true
845
+                },
846
+                "unpipe": {
847
+                    "version": "1.0.0",
848
+                    "bundled": true
849
+                },
850
+                "utils-merge": {
851
+                    "version": "1.0.1",
852
+                    "bundled": true
853
+                },
854
+                "vary": {
855
+                    "version": "1.1.2",
856
+                    "bundled": true
857
+                },
858
+                "wrappy": {
859
+                    "version": "1.0.2",
860
+                    "bundled": true
861
+                },
862
+                "xmlbuilder": {
863
+                    "version": "8.2.2",
864
+                    "bundled": true
865
+                },
866
+                "xmldom": {
867
+                    "version": "0.1.27",
868
+                    "bundled": true
869
+                }
870
+            }
871
+        },
217 872
         "cordova-plugin-splashscreen": {
218 873
             "version": "5.0.2",
219 874
             "resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.2.tgz",
@@ -223,6 +878,11 @@
223 878
             "version": "1.3.3",
224 879
             "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.3.tgz",
225 880
             "integrity": "sha1-tehezbv+Wu3tQKG/TuI3LmfZb7Q="
881
+        },
882
+        "ubuntu": {
883
+            "version": "2.0.0",
884
+            "resolved": "https://registry.npmjs.org/ubuntu/-/ubuntu-2.0.0.tgz",
885
+            "integrity": "sha1-VIN9X6tdxyj7lguobYcnE0g5ePI="
226 886
         }
227 887
     }
228 888
 }

+ 7
- 4
package.json View File

@@ -10,9 +10,11 @@
10 10
     "author": "Chris Cromer",
11 11
     "license": "BSD3",
12 12
     "dependencies": {
13
-        "cordova-android": "^7.1.1",
13
+        "cordova-android": "^7.1.4",
14
+        "cordova-browser": "^5.0.4",
14 15
         "cordova-plugin-splashscreen": "^5.0.2",
15
-        "cordova-plugin-whitelist": "^1.3.3"
16
+        "cordova-plugin-whitelist": "^1.3.3",
17
+        "ubuntu": "^2.0.0"
16 18
     },
17 19
     "cordova": {
18 20
         "plugins": {
@@ -20,7 +22,8 @@
20 22
             "cordova-plugin-splashscreen": {}
21 23
         },
22 24
         "platforms": [
23
-            "android"
25
+            "android",
26
+            "browser"
24 27
         ]
25 28
     }
26
-}
29
+}

+ 18
- 0
plugins/browser.json View File

@@ -0,0 +1,18 @@
1
+{
2
+  "prepare_queue": {
3
+    "installed": [],
4
+    "uninstalled": []
5
+  },
6
+  "config_munge": {
7
+    "files": {}
8
+  },
9
+  "installed_plugins": {
10
+    "cordova-plugin-splashscreen": {
11
+      "PACKAGE_NAME": "cl.cromer.jvonmobile"
12
+    },
13
+    "cordova-plugin-whitelist": {
14
+      "PACKAGE_NAME": "cl.cromer.jvonmobile"
15
+    }
16
+  },
17
+  "dependent_plugins": {}
18
+}

Loading…
Cancel
Save