Browse Source

Initial commit

Signed-off-by: Chris Cromer <chris@cromer.cl>
Chris Cromer 2 months ago
commit
27c42a55c8
100 changed files with 10309 additions and 0 deletions
  1. 13
    0
      .idea/jvon-mobile.iml
  2. 6
    0
      .idea/misc.xml
  3. 8
    0
      .idea/modules.xml
  4. 6
    0
      .idea/vcs.xml
  5. 2
    0
      .npmignore
  6. 40
    0
      config.xml
  7. 23
    0
      hooks/README.md
  8. 1
    0
      node_modules/.bin/create
  9. 1
    0
      node_modules/cordova-android/.eslintignore
  10. 10
    0
      node_modules/cordova-android/.eslintrc.yml
  11. 94
    0
      node_modules/cordova-android/.gitattributes
  12. 22
    0
      node_modules/cordova-android/.github/PULL_REQUEST_TEMPLATE.md
  13. 9
    0
      node_modules/cordova-android/.ratignore
  14. 8
    0
      node_modules/cordova-android/.reviewboardrc
  15. 28
    0
      node_modules/cordova-android/.travis.yml
  16. 38
    0
      node_modules/cordova-android/CONTRIBUTING.md
  17. 314
    0
      node_modules/cordova-android/LICENSE
  18. 15
    0
      node_modules/cordova-android/NOTICE
  19. 70
    0
      node_modules/cordova-android/README.md
  20. 703
    0
      node_modules/cordova-android/RELEASENOTES.md
  21. 1
    0
      node_modules/cordova-android/VERSION
  22. 38
    0
      node_modules/cordova-android/appveyor.yml
  23. 29
    0
      node_modules/cordova-android/bin/android_sdk_version
  24. 26
    0
      node_modules/cordova-android/bin/android_sdk_version.bat
  25. 31
    0
      node_modules/cordova-android/bin/check_reqs
  26. 26
    0
      node_modules/cordova-android/bin/check_reqs.bat
  27. 58
    0
      node_modules/cordova-android/bin/create
  28. 26
    0
      node_modules/cordova-android/bin/create.bat
  29. 360
    0
      node_modules/cordova-android/bin/lib/create.js
  30. 411
    0
      node_modules/cordova-android/bin/templates/cordova/Api.js
  31. 50
    0
      node_modules/cordova-android/bin/templates/cordova/build
  32. 26
    0
      node_modules/cordova-android/bin/templates/cordova/build.bat
  33. 51
    0
      node_modules/cordova-android/bin/templates/cordova/clean
  34. 26
    0
      node_modules/cordova-android/bin/templates/cordova/clean.bat
  35. 26
    0
      node_modules/cordova-android/bin/templates/cordova/defaults.xml
  36. 101
    0
      node_modules/cordova-android/bin/templates/cordova/lib/Adb.js
  37. 160
    0
      node_modules/cordova-android/bin/templates/cordova/lib/AndroidManifest.js
  38. 209
    0
      node_modules/cordova-android/bin/templates/cordova/lib/AndroidProject.js
  39. 42
    0
      node_modules/cordova-android/bin/templates/cordova/lib/AndroidStudio.js
  40. 102
    0
      node_modules/cordova-android/bin/templates/cordova/lib/android_sdk.js
  41. 294
    0
      node_modules/cordova-android/bin/templates/cordova/lib/build.js
  42. 124
    0
      node_modules/cordova-android/bin/templates/cordova/lib/builders/GenericBuilder.js
  43. 331
    0
      node_modules/cordova-android/bin/templates/cordova/lib/builders/GradleBuilder.js
  44. 303
    0
      node_modules/cordova-android/bin/templates/cordova/lib/builders/StudioBuilder.js
  45. 46
    0
      node_modules/cordova-android/bin/templates/cordova/lib/builders/builders.js
  46. 424
    0
      node_modules/cordova-android/bin/templates/cordova/lib/check_reqs.js
  47. 112
    0
      node_modules/cordova-android/bin/templates/cordova/lib/device.js
  48. 533
    0
      node_modules/cordova-android/bin/templates/cordova/lib/emulator.js
  49. 3
    0
      node_modules/cordova-android/bin/templates/cordova/lib/getASPath.bat
  50. 42
    0
      node_modules/cordova-android/bin/templates/cordova/lib/install-device
  51. 26
    0
      node_modules/cordova-android/bin/templates/cordova/lib/install-device.bat
  52. 38
    0
      node_modules/cordova-android/bin/templates/cordova/lib/install-emulator
  53. 26
    0
      node_modules/cordova-android/bin/templates/cordova/lib/install-emulator.bat
  54. 34
    0
      node_modules/cordova-android/bin/templates/cordova/lib/list-devices
  55. 26
    0
      node_modules/cordova-android/bin/templates/cordova/lib/list-devices.bat
  56. 34
    0
      node_modules/cordova-android/bin/templates/cordova/lib/list-emulator-images
  57. 26
    0
      node_modules/cordova-android/bin/templates/cordova/lib/list-emulator-images.bat
  58. 34
    0
      node_modules/cordova-android/bin/templates/cordova/lib/list-started-emulators
  59. 26
    0
      node_modules/cordova-android/bin/templates/cordova/lib/list-started-emulators.bat
  60. 56
    0
      node_modules/cordova-android/bin/templates/cordova/lib/log.js
  61. 72
    0
      node_modules/cordova-android/bin/templates/cordova/lib/plugin-build.gradle
  62. 320
    0
      node_modules/cordova-android/bin/templates/cordova/lib/pluginHandlers.js
  63. 480
    0
      node_modules/cordova-android/bin/templates/cordova/lib/prepare.js
  64. 68
    0
      node_modules/cordova-android/bin/templates/cordova/lib/retry.js
  65. 132
    0
      node_modules/cordova-android/bin/templates/cordova/lib/run.js
  66. 39
    0
      node_modules/cordova-android/bin/templates/cordova/lib/start-emulator
  67. 26
    0
      node_modules/cordova-android/bin/templates/cordova/lib/start-emulator.bat
  68. 36
    0
      node_modules/cordova-android/bin/templates/cordova/log
  69. 26
    0
      node_modules/cordova-android/bin/templates/cordova/log.bat
  70. 18
    0
      node_modules/cordova-android/bin/templates/cordova/loggingHelper.js
  71. 53
    0
      node_modules/cordova-android/bin/templates/cordova/run
  72. 26
    0
      node_modules/cordova-android/bin/templates/cordova/run.bat
  73. 29
    0
      node_modules/cordova-android/bin/templates/cordova/version
  74. 26
    0
      node_modules/cordova-android/bin/templates/cordova/version.bat
  75. 41
    0
      node_modules/cordova-android/bin/templates/project/Activity.java
  76. 49
    0
      node_modules/cordova-android/bin/templates/project/AndroidManifest.xml
  77. 324
    0
      node_modules/cordova-android/bin/templates/project/app/build.gradle
  78. 2189
    0
      node_modules/cordova-android/bin/templates/project/assets/www/cordova.js
  79. 115
    0
      node_modules/cordova-android/bin/templates/project/assets/www/css/index.css
  80. BIN
      node_modules/cordova-android/bin/templates/project/assets/www/img/cordova.png
  81. BIN
      node_modules/cordova-android/bin/templates/project/assets/www/img/logo.png
  82. 49
    0
      node_modules/cordova-android/bin/templates/project/assets/www/index.html
  83. 51
    0
      node_modules/cordova-android/bin/templates/project/assets/www/js/index.js
  84. 54
    0
      node_modules/cordova-android/bin/templates/project/build.gradle
  85. 14
    0
      node_modules/cordova-android/bin/templates/project/gitignore
  86. 311
    0
      node_modules/cordova-android/bin/templates/project/legacy/build.gradle
  87. 13
    0
      node_modules/cordova-android/bin/templates/project/project.properties
  88. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-land-hdpi/screen.png
  89. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-land-ldpi/screen.png
  90. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-land-mdpi/screen.png
  91. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-land-xhdpi/screen.png
  92. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-land-xxhdpi/screen.png
  93. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-land-xxxhdpi/screen.png
  94. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-port-hdpi/screen.png
  95. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-port-ldpi/screen.png
  96. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-port-mdpi/screen.png
  97. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-port-xhdpi/screen.png
  98. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-port-xxhdpi/screen.png
  99. BIN
      node_modules/cordova-android/bin/templates/project/res/drawable-port-xxxhdpi/screen.png
  100. 0
    0
      node_modules/cordova-android/bin/templates/project/res/mipmap-hdpi/icon.png

+ 13
- 0
.idea/jvon-mobile.iml View File

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="WEB_MODULE" version="4">
3
+  <component name="NewModuleRootManager">
4
+    <content url="file://$MODULE_DIR$">
5
+      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
+      <excludeFolder url="file://$MODULE_DIR$/platforms" />
7
+      <excludeFolder url="file://$MODULE_DIR$/temp" />
8
+      <excludeFolder url="file://$MODULE_DIR$/tmp" />
9
+    </content>
10
+    <orderEntry type="inheritedJdk" />
11
+    <orderEntry type="sourceFolder" forTests="false" />
12
+  </component>
13
+</module>

+ 6
- 0
.idea/misc.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="JavaScriptSettings">
4
+    <option name="languageLevel" value="ES6" />
5
+  </component>
6
+</project>

+ 8
- 0
.idea/modules.xml View File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/.idea/jvon-mobile.iml" filepath="$PROJECT_DIR$/.idea/jvon-mobile.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
.idea/vcs.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+  </component>
6
+</project>

+ 2
- 0
.npmignore View File

@@ -0,0 +1,2 @@
1
+# OS X
2
+.DS_Store

+ 40
- 0
config.xml View File

@@ -0,0 +1,40 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<widget id="cl.cromer.jvonmobile" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
+    <name>JVON Movil</name>
4
+    <description>
5
+        Simulador de lenguaje basado en la arquitectura de John von Nuemann.
6
+    </description>
7
+    <author email="chris@cromer.cl" href="https://cromer.cl">
8
+        Chris Cromer
9
+    </author>
10
+    <content src="index.html" />
11
+    <plugin name="cordova-plugin-whitelist" spec="1" />
12
+    <access origin="*" />
13
+    <allow-intent href="http://*/*" />
14
+    <allow-intent href="https://*/*" />
15
+    <allow-intent href="tel:*" />
16
+    <allow-intent href="sms:*" />
17
+    <allow-intent href="mailto:*" />
18
+    <allow-intent href="geo:*" />
19
+    <platform name="android">
20
+        <allow-intent href="market:*" />
21
+        <icon density="ldpi" src="res/icon/android/icon-36-ldpi.png" />
22
+        <icon density="mdpi" src="res/icon/android/icon-48-mdpi.png" />
23
+        <icon density="hdpi" src="res/icon/android/icon-72-hdpi.png" />
24
+        <icon density="xhdpi" src="res/icon/android/icon-96-xhdpi.png" />
25
+        <splash density="land-hdpi" src="res/screen/android/screen-hdpi-landscape.png" />
26
+        <splash density="land-ldpi" src="res/screen/android/screen-ldpi-landscape.png" />
27
+        <splash density="land-mdpi" src="res/screen/android/screen-mdpi-landscape.png" />
28
+        <splash density="land-xhdpi" src="res/screen/android/screen-xhdpi-landscape.png" />
29
+        <splash density="port-hdpi" src="res/screen/android/screen-hdpi-portrait.png" />
30
+        <splash density="port-ldpi" src="res/screen/android/screen-ldpi-portrait.png" />
31
+        <splash density="port-mdpi" src="res/screen/android/screen-mdpi-portrait.png" />
32
+        <splash density="port-xhdpi" src="res/screen/android/screen-xhdpi-portrait.png" />
33
+    </platform>
34
+    <platform name="ios">
35
+        <allow-intent href="itms:*" />
36
+        <allow-intent href="itms-apps:*" />
37
+    </platform>
38
+    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
39
+    <engine name="android" spec="^7.1.1" />
40
+</widget>

+ 23
- 0
hooks/README.md View File

@@ -0,0 +1,23 @@
1
+<!--
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
+-->
21
+# Cordova Hooks
22
+
23
+Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system  to customize cordova commands. See Hooks Guide for more details:  http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.

+ 1
- 0
node_modules/.bin/create View File

@@ -0,0 +1 @@
1
+../cordova-android/bin/create

+ 1
- 0
node_modules/cordova-android/.eslintignore View File

@@ -0,0 +1 @@
1
+bin/templates/project/assets/www/cordova.js

+ 10
- 0
node_modules/cordova-android/.eslintrc.yml View File

@@ -0,0 +1,10 @@
1
+root: true
2
+extends: semistandard
3
+rules:
4
+  indent:
5
+    - error
6
+    - 4
7
+  camelcase: off
8
+  padded-blocks: off
9
+  operator-linebreak: off
10
+  no-throw-literal: off

+ 94
- 0
node_modules/cordova-android/.gitattributes View File

@@ -0,0 +1,94 @@
1
+* text eol=lf
2
+
3
+# source code
4
+*.php text
5
+*.css text
6
+*.sass text
7
+*.scss text
8
+*.less text
9
+*.styl text
10
+*.js text
11
+*.coffee text
12
+*.json text
13
+*.htm text
14
+*.html text
15
+*.xml text
16
+*.svg text
17
+*.txt text
18
+*.ini text
19
+*.inc text
20
+*.pl text
21
+*.rb text
22
+*.py text
23
+*.scm text
24
+*.sql text
25
+*.sh text
26
+*.bat text
27
+
28
+# templates
29
+*.ejs text
30
+*.hbt text
31
+*.jade text
32
+*.haml text
33
+*.hbs text
34
+*.dot text
35
+*.tmpl text
36
+*.phtml text
37
+
38
+# server config
39
+.htaccess text
40
+
41
+# git config
42
+.gitattributes text
43
+.gitignore text
44
+.gitconfig text
45
+
46
+# code analysis config
47
+.jshintrc text
48
+.jscsrc text
49
+.jshintignore text
50
+.csslintrc text
51
+
52
+# misc config
53
+*.yaml text
54
+*.yml text
55
+.editorconfig text
56
+
57
+# build config
58
+*.npmignore text
59
+*.bowerrc text
60
+
61
+# Heroku
62
+Procfile text
63
+.slugignore text
64
+
65
+# Documentation
66
+*.md text
67
+LICENSE text
68
+AUTHORS text
69
+
70
+
71
+#
72
+## These files are binary and should be left untouched
73
+#
74
+
75
+# (binary is a macro for -text -diff)
76
+*.png binary
77
+*.jpg binary
78
+*.jpeg binary
79
+*.gif binary
80
+*.ico binary
81
+*.mov binary
82
+*.mp4 binary
83
+*.mp3 binary
84
+*.flv binary
85
+*.fla binary
86
+*.swf binary
87
+*.gz binary
88
+*.zip binary
89
+*.7z binary
90
+*.ttf binary
91
+*.eot binary
92
+*.woff binary
93
+*.pyc binary
94
+*.pdf binary

+ 22
- 0
node_modules/cordova-android/.github/PULL_REQUEST_TEMPLATE.md View File

@@ -0,0 +1,22 @@
1
+<!--
2
+Please make sure the checklist boxes are all checked before submitting the PR. The checklist
3
+is intended as a quick reference, for complete details please see our Contributor Guidelines:
4
+
5
+http://cordova.apache.org/contribute/contribute_guidelines.html
6
+
7
+Thanks!
8
+-->
9
+
10
+### Platforms affected
11
+
12
+
13
+### What does this PR do?
14
+
15
+
16
+### What testing has been done on this change?
17
+
18
+
19
+### Checklist
20
+- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
21
+- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
22
+- [ ] Added automated test coverage as appropriate for this change.

+ 9
- 0
node_modules/cordova-android/.ratignore View File

@@ -0,0 +1,9 @@
1
+*.properties
2
+bin
3
+gen
4
+proguard-project.txt
5
+spec
6
+appveyor.yml
7
+framework/build
8
+ic_launcher.png
9
+build

+ 8
- 0
node_modules/cordova-android/.reviewboardrc View File

@@ -0,0 +1,8 @@
1
+#
2
+# Settings for post-review (used for uploading diffs to reviews.apache.org).
3
+#
4
+GUESS_FIELDS = True
5
+OPEN_BROWSER = True
6
+TARGET_GROUPS = 'cordova'
7
+REVIEWBOARD_URL = 'http://reviews.apache.org'
8
+

+ 28
- 0
node_modules/cordova-android/.travis.yml View File

@@ -0,0 +1,28 @@
1
+language: android
2
+sudo: false
3
+jdk:
4
+    - oraclejdk8
5
+env:
6
+    global:
7
+      - ANDROID_TOOLS=${ANDROID_HOME}/tools
8
+before_install:
9
+    - nvm install 6
10
+    # ensure at least gradle 3.3 is in place.
11
+    - wget http://services.gradle.org/distributions/gradle-3.3-bin.zip
12
+    - unzip gradle-3.3-bin.zip
13
+    - export GRADLE_HOME=$PWD/gradle-3.3
14
+    - export PATH=${GRADLE_HOME}/bin:${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_TOOLS}:${ANDROID_TOOLS}/bin:${ANDROID_HOME}/platform-tools:$PATH
15
+    - node --version
16
+    - gradle --version
17
+    - echo y | android --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository
18
+android:
19
+    components:
20
+      - tools
21
+install:
22
+    - npm install
23
+    - npm install -g codecov
24
+script:
25
+    - npm test
26
+    - npm run cover
27
+after_script:
28
+    - codecov

+ 38
- 0
node_modules/cordova-android/CONTRIBUTING.md View File

@@ -0,0 +1,38 @@
1
+<!--
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
+-->
21
+
22
+# Contributing to Apache Cordova
23
+
24
+Anyone can contribute to Cordova. And we need your contributions.
25
+
26
+There are multiple ways to contribute: report bugs, improve the docs, and
27
+contribute code.
28
+  
29
+For instructions on this, start with the
30
+[contribution overview](http://cordova.apache.org/contribute/).
31
+
32
+The details are explained there, but the important items are:
33
+ - Sign and submit an Apache ICLA (Contributor License Agreement).
34
+ - Have a Jira issue open that corresponds to your contribution.
35
+ - Run the tests so your patch doesn't break existing functionality.
36
+
37
+We look forward to your contributions!
38
+

+ 314
- 0
node_modules/cordova-android/LICENSE View File

@@ -0,0 +1,314 @@
1
+
2
+                                 Apache License
3
+                           Version 2.0, January 2004
4
+                        http://www.apache.org/licenses/
5
+
6
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+   1. Definitions.
9
+
10
+      "License" shall mean the terms and conditions for use, reproduction,
11
+      and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+      "Licensor" shall mean the copyright owner or entity authorized by
14
+      the copyright owner that is granting the License.
15
+
16
+      "Legal Entity" shall mean the union of the acting entity and all
17
+      other entities that control, are controlled by, or are under common
18
+      control with that entity. For the purposes of this definition,
19
+      "control" means (i) the power, direct or indirect, to cause the
20
+      direction or management of such entity, whether by contract or
21
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+      outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+      "You" (or "Your") shall mean an individual or Legal Entity
25
+      exercising permissions granted by this License.
26
+
27
+      "Source" form shall mean the preferred form for making modifications,
28
+      including but not limited to software source code, documentation
29
+      source, and configuration files.
30
+
31
+      "Object" form shall mean any form resulting from mechanical
32
+      transformation or translation of a Source form, including but
33
+      not limited to compiled object code, generated documentation,
34
+      and conversions to other media types.
35
+
36
+      "Work" shall mean the work of authorship, whether in Source or
37
+      Object form, made available under the License, as indicated by a
38
+      copyright notice that is included in or attached to the work
39
+      (an example is provided in the Appendix below).
40
+
41
+      "Derivative Works" shall mean any work, whether in Source or Object
42
+      form, that is based on (or derived from) the Work and for which the
43
+      editorial revisions, annotations, elaborations, or other modifications
44
+      represent, as a whole, an original work of authorship. For the purposes
45
+      of this License, Derivative Works shall not include works that remain
46
+      separable from, or merely link (or bind by name) to the interfaces of,
47
+      the Work and Derivative Works thereof.
48
+
49
+      "Contribution" shall mean any work of authorship, including
50
+      the original version of the Work and any modifications or additions
51
+      to that Work or Derivative Works thereof, that is intentionally
52
+      submitted to Licensor for inclusion in the Work by the copyright owner
53
+      or by an individual or Legal Entity authorized to submit on behalf of
54
+      the copyright owner. For the purposes of this definition, "submitted"
55
+      means any form of electronic, verbal, or written communication sent
56
+      to the Licensor or its representatives, including but not limited to
57
+      communication on electronic mailing lists, source code control systems,
58
+      and issue tracking systems that are managed by, or on behalf of, the
59
+      Licensor for the purpose of discussing and improving the Work, but
60
+      excluding communication that is conspicuously marked or otherwise
61
+      designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+      "Contributor" shall mean Licensor and any individual or Legal Entity
64
+      on behalf of whom a Contribution has been received by Licensor and
65
+      subsequently incorporated within the Work.
66
+
67
+   2. Grant of Copyright License. Subject to the terms and conditions of
68
+      this License, each Contributor hereby grants to You a perpetual,
69
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+      copyright license to reproduce, prepare Derivative Works of,
71
+      publicly display, publicly perform, sublicense, and distribute the
72
+      Work and such Derivative Works in Source or Object form.
73
+
74
+   3. Grant of Patent License. Subject to the terms and conditions of
75
+      this License, each Contributor hereby grants to You a perpetual,
76
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+      (except as stated in this section) patent license to make, have made,
78
+      use, offer to sell, sell, import, and otherwise transfer the Work,
79
+      where such license applies only to those patent claims licensable
80
+      by such Contributor that are necessarily infringed by their
81
+      Contribution(s) alone or by combination of their Contribution(s)
82
+      with the Work to which such Contribution(s) was submitted. If You
83
+      institute patent litigation against any entity (including a
84
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+      or a Contribution incorporated within the Work constitutes direct
86
+      or contributory patent infringement, then any patent licenses
87
+      granted to You under this License for that Work shall terminate
88
+      as of the date such litigation is filed.
89
+
90
+   4. Redistribution. You may reproduce and distribute copies of the
91
+      Work or Derivative Works thereof in any medium, with or without
92
+      modifications, and in Source or Object form, provided that You
93
+      meet the following conditions:
94
+
95
+      (a) You must give any other recipients of the Work or
96
+          Derivative Works a copy of this License; and
97
+
98
+      (b) You must cause any modified files to carry prominent notices
99
+          stating that You changed the files; and
100
+
101
+      (c) You must retain, in the Source form of any Derivative Works
102
+          that You distribute, all copyright, patent, trademark, and
103
+          attribution notices from the Source form of the Work,
104
+          excluding those notices that do not pertain to any part of
105
+          the Derivative Works; and
106
+
107
+      (d) If the Work includes a "NOTICE" text file as part of its
108
+          distribution, then any Derivative Works that You distribute must
109
+          include a readable copy of the attribution notices contained
110
+          within such NOTICE file, excluding those notices that do not
111
+          pertain to any part of the Derivative Works, in at least one
112
+          of the following places: within a NOTICE text file distributed
113
+          as part of the Derivative Works; within the Source form or
114
+          documentation, if provided along with the Derivative Works; or,
115
+          within a display generated by the Derivative Works, if and
116
+          wherever such third-party notices normally appear. The contents
117
+          of the NOTICE file are for informational purposes only and
118
+          do not modify the License. You may add Your own attribution
119
+          notices within Derivative Works that You distribute, alongside
120
+          or as an addendum to the NOTICE text from the Work, provided
121
+          that such additional attribution notices cannot be construed
122
+          as modifying the License.
123
+
124
+      You may add Your own copyright statement to Your modifications and
125
+      may provide additional or different license terms and conditions
126
+      for use, reproduction, or distribution of Your modifications, or
127
+      for any such Derivative Works as a whole, provided Your use,
128
+      reproduction, and distribution of the Work otherwise complies with
129
+      the conditions stated in this License.
130
+
131
+   5. Submission of Contributions. Unless You explicitly state otherwise,
132
+      any Contribution intentionally submitted for inclusion in the Work
133
+      by You to the Licensor shall be under the terms and conditions of
134
+      this License, without any additional terms or conditions.
135
+      Notwithstanding the above, nothing herein shall supersede or modify
136
+      the terms of any separate license agreement you may have executed
137
+      with Licensor regarding such Contributions.
138
+
139
+   6. Trademarks. This License does not grant permission to use the trade
140
+      names, trademarks, service marks, or product names of the Licensor,
141
+      except as required for reasonable and customary use in describing the
142
+      origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+   7. Disclaimer of Warranty. Unless required by applicable law or
145
+      agreed to in writing, Licensor provides the Work (and each
146
+      Contributor provides its Contributions) on an "AS IS" BASIS,
147
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+      implied, including, without limitation, any warranties or conditions
149
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+      PARTICULAR PURPOSE. You are solely responsible for determining the
151
+      appropriateness of using or redistributing the Work and assume any
152
+      risks associated with Your exercise of permissions under this License.
153
+
154
+   8. Limitation of Liability. In no event and under no legal theory,
155
+      whether in tort (including negligence), contract, or otherwise,
156
+      unless required by applicable law (such as deliberate and grossly
157
+      negligent acts) or agreed to in writing, shall any Contributor be
158
+      liable to You for damages, including any direct, indirect, special,
159
+      incidental, or consequential damages of any character arising as a
160
+      result of this License or out of the use or inability to use the
161
+      Work (including but not limited to damages for loss of goodwill,
162
+      work stoppage, computer failure or malfunction, or any and all
163
+      other commercial damages or losses), even if such Contributor
164
+      has been advised of the possibility of such damages.
165
+
166
+   9. Accepting Warranty or Additional Liability. While redistributing
167
+      the Work or Derivative Works thereof, You may choose to offer,
168
+      and charge a fee for, acceptance of support, warranty, indemnity,
169
+      or other liability obligations and/or rights consistent with this
170
+      License. However, in accepting such obligations, You may act only
171
+      on Your own behalf and on Your sole responsibility, not on behalf
172
+      of any other Contributor, and only if You agree to indemnify,
173
+      defend, and hold each Contributor harmless for any liability
174
+      incurred by, or claims asserted against, such Contributor by reason
175
+      of your accepting any such warranty or additional liability.
176
+
177
+   END OF TERMS AND CONDITIONS
178
+
179
+   APPENDIX: How to apply the Apache License to your work.
180
+
181
+      To apply the Apache License to your work, attach the following
182
+      boilerplate notice, with the fields enclosed by brackets "[]"
183
+      replaced with your own identifying information. (Don't include
184
+      the brackets!)  The text should be enclosed in the appropriate
185
+      comment syntax for the file format. We also recommend that a
186
+      file or class name and description of purpose be included on the
187
+      same "printed page" as the copyright notice for easier
188
+      identification within third-party archives.
189
+
190
+   Copyright 2015 Apache Cordova
191
+
192
+   Licensed under the Apache License, Version 2.0 (the "License");
193
+   you may not use this file except in compliance with the License.
194
+   You may obtain a copy of the License at
195
+
196
+       http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+   Unless required by applicable law or agreed to in writing, software
199
+   distributed under the License is distributed on an "AS IS" BASIS,
200
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+   See the License for the specific language governing permissions and
202
+   limitations under the License.
203
+
204
+ ADDITIONAL LICENSES:
205
+
206
+================================================================================
207
+bin/node_modules/q
208
+================================================================================
209
+
210
+Copyright 2009–2012 Kristopher Michael Kowal. All rights reserved.
211
+Permission is hereby granted, free of charge, to any person obtaining a copy
212
+of this software and associated documentation files (the "Software"), to
213
+deal in the Software without restriction, including without limitation the
214
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
215
+sell copies of the Software, and to permit persons to whom the Software is
216
+furnished to do so, subject to the following conditions:
217
+
218
+The above copyright notice and this permission notice shall be included in
219
+all copies or substantial portions of the Software.
220
+
221
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
222
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
223
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
224
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
225
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
226
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
227
+IN THE SOFTWARE.
228
+
229
+================================================================================
230
+bin/node_modules/shelljs
231
+================================================================================
232
+Copyright (c) 2012, Artur Adib <aadib@mozilla.com>
233
+All rights reserved.
234
+
235
+You may use this project under the terms of the New BSD license as follows:
236
+
237
+Redistribution and use in source and binary forms, with or without
238
+modification, are permitted provided that the following conditions are met:
239
+    * Redistributions of source code must retain the above copyright
240
+      notice, this list of conditions and the following disclaimer.
241
+    * Redistributions in binary form must reproduce the above copyright
242
+      notice, this list of conditions and the following disclaimer in the
243
+      documentation and/or other materials provided with the distribution.
244
+    * Neither the name of Artur Adib nor the
245
+      names of the contributors may be used to endorse or promote products
246
+      derived from this software without specific prior written permission.
247
+
248
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
249
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
250
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
251
+ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
252
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
253
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
254
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
255
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
257
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
258
+
259
+================================================================================
260
+bin/node_modules/nopt
261
+================================================================================
262
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
263
+All rights reserved.
264
+
265
+Permission is hereby granted, free of charge, to any person
266
+obtaining a copy of this software and associated documentation
267
+files (the "Software"), to deal in the Software without
268
+restriction, including without limitation the rights to use,
269
+copy, modify, merge, publish, distribute, sublicense, and/or sell
270
+copies of the Software, and to permit persons to whom the
271
+Software is furnished to do so, subject to the following
272
+conditions:
273
+
274
+The above copyright notice and this permission notice shall be
275
+included in all copies or substantial portions of the Software.
276
+
277
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
278
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
279
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
280
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
281
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
282
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
283
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
284
+OTHER DEALINGS IN THE SOFTWARE.
285
+
286
+================================================================================
287
+bin/node_modules/which
288
+================================================================================
289
+
290
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
291
+All rights reserved.
292
+
293
+Permission is hereby granted, free of charge, to any person
294
+obtaining a copy of this software and associated documentation
295
+files (the "Software"), to deal in the Software without
296
+restriction, including without limitation the rights to use,
297
+copy, modify, merge, publish, distribute, sublicense, and/or sell
298
+copies of the Software, and to permit persons to whom the
299
+Software is furnished to do so, subject to the following
300
+conditions:
301
+
302
+The above copyright notice and this permission notice shall be
303
+included in all copies or substantial portions of the Software.
304
+
305
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
306
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
307
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
308
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
309
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
310
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
311
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
312
+OTHER DEALINGS IN THE SOFTWARE.
313
+
314
+

+ 15
- 0
node_modules/cordova-android/NOTICE View File

@@ -0,0 +1,15 @@
1
+Apache Cordova
2
+Copyright 2015 The Apache Software Foundation
3
+
4
+This product includes software developed at
5
+The Apache Software Foundation (http://www.apache.org)
6
+
7
+=========================================================================
8
+==  NOTICE file corresponding to the section 4 d of                    ==
9
+==  the Apache License, Version 2.0,                                   ==
10
+==  in this case for the Android-specific code.                        ==
11
+=========================================================================
12
+
13
+This product includes software developed as part of
14
+The Android Open Source Project (http://source.android.com).
15
+

+ 70
- 0
node_modules/cordova-android/README.md View File

@@ -0,0 +1,70 @@
1
+<!--
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
+-->
21
+
22
+[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-android?branch=master)](https://ci.appveyor.com/project/Humbedooh/cordova-android)
23
+[![Build Status](https://travis-ci.org/apache/cordova-android.svg?branch=master)](https://travis-ci.org/apache/cordova-android)
24
+[![codecov.io](https://codecov.io/github/apache/cordova-android/coverage.svg?branch=master)](https://codecov.io/github/apache/cordova-android?branch=master)
25
+
26
+# Cordova Android
27
+
28
+Cordova Android is an Android application library that allows for Cordova-based
29
+projects to be built for the Android Platform. Cordova based applications are,
30
+at the core, applications written with web technology: HTML, CSS and JavaScript.
31
+
32
+[Apache Cordova](https://cordova.apache.org) is a project of The Apache Software Foundation (ASF).
33
+
34
+:warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Android%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
35
+
36
+
37
+## Requires
38
+
39
+- Java JDK 1.8 or greater
40
+- Android SDK [http://developer.android.com](http://developer.android.com)
41
+
42
+
43
+## Cordova Android Developer Tools
44
+
45
+We recommend using the [Cordova command-line tool](https://www.npmjs.com/package/cordova) to create projects and be able to easily install plugins.
46
+
47
+However, the following scripts can be used instead:
48
+
49
+    ./bin/create [path package activity] ... creates the ./example app or a cordova android project
50
+    ./bin/check_reqs ....................... checks that your environment is set up for cordova-android development
51
+    ./bin/update [path] .................... updates an existing cordova-android project to the version of the framework
52
+
53
+These commands live in a generated Cordova Android project. Any interactions with the emulator require you to have an AVD defined.
54
+
55
+    ./cordova/clean ........................ cleans the project
56
+    ./cordova/build ........................ calls `clean` then compiles the project
57
+    ./cordova/log   ........................ streams device or emulator logs to STDOUT
58
+    ./cordova/run   ........................ calls `build` then deploys to a connected Android device. If no Android device is detected, will launch an emulator and deploy to it.
59
+    ./cordova/version ...................... returns the cordova-android version of the current project
60
+
61
+## Using Android Studio
62
+
63
+1. Create a project
64
+2. Import it via "Non-Android Studio Project"
65
+
66
+## Running the Native Tests
67
+
68
+The `test/` directory in this project contains an Android test project that can
69
+be used to run different kinds of native tests. Check out the
70
+[README contained therein](test/README.md) for more details!

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

@@ -0,0 +1,703 @@
1
+<!--
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
+-->
21
+## Release Notes for Cordova (Android) ##
22
+
23
+### 7.1.1 (Jul 11, 2018)
24
+* Fix unsafe property access in run.js (#445)
25
+* Emit log event instead of logging directly (#452)
26
+* [CB-14101](https://issues.apache.org/jira/browse/CB-14101) Fix Java version check for Java >= 9 (#446)
27
+* [CB-14127](https://issues.apache.org/jira/browse/CB-14127) (android) Move google maven repo ahead of jcenter
28
+* [CB-13923](https://issues.apache.org/jira/browse/CB-13923) (android) fix -1 length for compressed files
29
+* [CB-14145](https://issues.apache.org/jira/browse/CB-14145) use cordova-common@2.2.5 and update other dependencies to resolve `npm audit` warnings
30
+* [CB-9366](https://issues.apache.org/jira/browse/CB-9366) log error.stack in cordova.js
31
+
32
+### 7.1.0 (Feb 20, 2018)
33
+* [CB-13879](https://issues.apache.org/jira/browse/CB-13879) updated gradle tools dependency to 3.0.1 for project template
34
+* [CB-13831](https://issues.apache.org/jira/browse/CB-13831) Update `android-versions` to 1.3.0 to support SDK 27.
35
+* [CB-13800](https://issues.apache.org/jira/browse/CB-13800) Drop pre-KitKat specific code
36
+* [CB-13724](https://issues.apache.org/jira/browse/CB-13724) Updated the **Android** Tooling required for the latest version on both the test project, and the template
37
+* [CB-13724](https://issues.apache.org/jira/browse/CB-13724) Bump Target SDK to API 27
38
+* [CB-13646](https://issues.apache.org/jira/browse/CB-13646) Using the deprecated `NDK` by default breaks the build.  Crosswalk users need to specify the Gradle parameters to keep it working.
39
+* [CB-12218](https://issues.apache.org/jira/browse/CB-12218) Fix consistency of null result message
40
+* [CB-13571](https://issues.apache.org/jira/browse/CB-13571) Prevent crash with unrecognized **Android** version
41
+* [CB-13721](https://issues.apache.org/jira/browse/CB-13721) Fix build apps that use `cdvHelpers.getConfigPreference`
42
+* [CB-13621](https://issues.apache.org/jira/browse/CB-13621) Wrote similar warning to [CB-12948](https://issues.apache.org/jira/browse/CB-12948) on **iOS**. We no longer support `cordova update` command.
43
+
44
+### 7.0.0 (Nov 30, 2017)
45
+* [CB-13612](https://issues.apache.org/jira/browse/CB-13612) Fix the remapper so that XML files copy over and the Camera works again.
46
+* [CB-13741](https://issues.apache.org/jira/browse/CB-13741) Bump `package.json` so we can install plugins
47
+* [CB-13610](https://issues.apache.org/jira/browse/CB-13610) Compress the default app assets
48
+* [CB-12835](https://issues.apache.org/jira/browse/CB-12835) add a Context getter in CordovaInterface
49
+* [CB-8976](https://issues.apache.org/jira/browse/CB-8976) Added the `cdvVersionCodeForceAbiDigit` flag to the template build.gradle that appends 0 to the versionCode when `cdvBuildMultipleApks` is not set
50
+* [CB-12291](https://issues.apache.org/jira/browse/CB-12291) (android) Add x86_64, arm64 and armeabi architecture flavors
51
+* [CB-13602](https://issues.apache.org/jira/browse/CB-13602) We were setting the path wrong, this is hacky but it works
52
+* [CB-13601](https://issues.apache.org/jira/browse/CB-13601) Fixing the standalone run scripts to make sure this works without using the CLI
53
+* [CB-13580](https://issues.apache.org/jira/browse/CB-13580) fix build for multiple apks (different product flavors)
54
+* [CB-13558](https://issues.apache.org/jira/browse/CB-13558) Upgrading the gradle so we can upload the AAR
55
+* [CB-13297](https://issues.apache.org/jira/browse/CB-13297) This just works once you bump the project structure.  Java 1.8 compatibility baked-in
56
+* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) **Android** Studio 3 work, things have changed with how the platform is built
57
+* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) Found bug where the gradle subproject changes weren't actually getting written to the correct gradle file
58
+* [CB-13470](https://issues.apache.org/jira/browse/CB-13470) Fix Clean so that it cleans the **Android** Studio structure
59
+* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) Adding specs for resource files inside an **Android** Studio Project
60
+* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) Added remapping for drawables
61
+* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) Found bug in Api.js where xml/strings.xml is used instead of values/strings.xml
62
+* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) Setup Api.js to support multiple builders based on project structure
63
+* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) Changing directory creation, will most likely hide this behind a flag for the next release of `cordova-android`, and then make it default in the next major pending feedback
64
+* Adding the Studio Builder to build a project based on **Android** Studio, and deleting Ant, since Google does not support Ant Builds anymore. Sorry guys!
65
+
66
+### 6.4.0 (Nov 06, 2017)
67
+* [CB-13289](https://issues.apache.org/jira/browse/CB-13289) Fixing build problems with Studio Three, but keeping **Windows** Gradle fix for now, will be deprecated
68
+* [CB-13289](https://issues.apache.org/jira/browse/CB-13289) Fix test to work with new Google **Android** Gradle DSL
69
+* :CB-13501 : update appveyor node versions to support node 8
70
+* [CB-13499](https://issues.apache.org/jira/browse/CB-13499) Remove duplicate "setting" in error strings
71
+* Include missing values for task.name when 'cdvBuildMultipleApks' option is true, 'task.name' can have 'validateSigningArmv7Release' or 'validateSigningX86Release' values too.
72
+* [CB-13406](https://issues.apache.org/jira/browse/CB-13406) Fixed AVD API level comparison when choosing sub-par API level match. Added tests for the best_image method.
73
+* [CB-13404](https://issues.apache.org/jira/browse/CB-13404) add **Android**-versions to bundledDependencies. Ignore best emulator selection when parsed AVD information does not include API level in the target
74
+* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) : eslint ignoring cordova.js
75
+* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) Temporarily disabling eslint since cordova-js does not have eslint yet.
76
+
77
+### 6.3.0 (Sep 25, 2017)
78
+* [CB-6936](https://issues.apache.org/jira/browse/CB-6936) fix crash when calling methods on a destroyed webview
79
+* [CB-12981](https://issues.apache.org/jira/browse/CB-12981) handle SDK 26.0.2 slightly different AVD list output for **Android** 8+ AVDs. Would cause "cannot read property replace of undefined" errors when trying to deploy an **Android** 8 emulator.
80
+* Updated maven repo to include most recent lib versions
81
+* [CB-13177](https://issues.apache.org/jira/browse/CB-13177) Updating to API Level 26
82
+* Revert [CB-12015](https://issues.apache.org/jira/browse/CB-12015) initial-scale values less than 1.0 are ignored on **Android**
83
+* [CB-12730](https://issues.apache.org/jira/browse/CB-12730) The Cordova Compatibility Plugin is now integrated into cordova-android
84
+* [CB-12453](https://issues.apache.org/jira/browse/CB-12453) Remove unnecessary double quotes from .bat files which are the causes of crash if project path contains spaces
85
+* [CB-13031](https://issues.apache.org/jira/browse/CB-13031) Fix bug with case-sensitivity of **Android**-packageName
86
+* [CB-10916](https://issues.apache.org/jira/browse/CB-10916) Support display name for **Android**
87
+* [CB-12423](https://issues.apache.org/jira/browse/CB-12423) make explicit JDK 1.8 or greater is needed in the `README`, we require 1.8 for compilation, but do not have 1.8 Java features yet
88
+* [CB-13006](https://issues.apache.org/jira/browse/CB-13006) removed create and update end-to-end tests, and instead added more unit test coverage. tweaked code coverage invocation so that we get coverage details on the create.js module. slight changes to the create.js module so that it is slightly easier to test.
89
+* [CB-12950](https://issues.apache.org/jira/browse/CB-12950) lots of tweaks for end-to-end test runs, especially on CI: - rename npm tasks to reflect what they do (npm run unit-tests, npm run e2e-tests). main `npm test` runs linter, unit tests and e2e tests now. - locked jasmine down to ~2.6.0. - consolidate gitignores. - updated travis to run `npm test`. add **Android** sdk installation to appveyor ci run.align **Android** dpendencies across travis and appveyor. have appveyor install gradle. force gradle to version 3.4.1 in appveyor, as that seems to be the only version choco has. explicitly invoke sdkmanager to move license accepting process along.
90
+* [CB-12605](https://issues.apache.org/jira/browse/CB-12605) In **Windows** get **Android** studio path from the registry
91
+* [CB-12762](https://issues.apache.org/jira/browse/CB-12762) : pointed `package.json` repo items to github mirrors instead of apache repos site
92
+* [CB-12617](https://issues.apache.org/jira/browse/CB-12617) : removed node0.x support for platforms and added engineStrict
93
+
94
+### 6.2.3 (May 2, 2017)
95
+* [CB-12640](https://issues.apache.org/jira/browse/CB-12640) better handling of unrecognized Android SDK commands on **Windows**.
96
+* [CB-12640](https://issues.apache.org/jira/browse/CB-12640) flipped avd parsing logic so that it always tries to use avdmanager to retrieve avds first, then falls back to android command if avdmanager cannot be found (and errors with ENOENT). updated tests - and added explicit tests to ensure to shell out to singular forms of sub-commands when executing `android`
97
+* [CB-12640](https://issues.apache.org/jira/browse/CB-12640) support for android sdk tools 26.0.1.
98
+
99
+### 6.2.2 (Apr 24, 2017)
100
+* [CB-12697](https://issues.apache.org/jira/browse/CB-12697) Updated checked-in `node_modules`
101
+
102
+### 6.2.1 (Apr 02, 2017)
103
+* [CB-12621](https://issues.apache.org/jira/browse/CB-12621) reverted elementtree dep to 0.1.6
104
+
105
+### 6.2.0 (Mar 28, 2017)
106
+* [CB-12614](https://issues.apache.org/jira/browse/CB-12614) Adding headers to tests
107
+* [CB-8978](https://issues.apache.org/jira/browse/CB-8978) Prepare copy `resource-files` from `config.xml`
108
+* [CB-12605](https://issues.apache.org/jira/browse/CB-12605) Fix a requirements check failure on **Windows**
109
+* [CB-12595](https://issues.apache.org/jira/browse/CB-12595) This should find an **Android Studio** installation and use the sweet gradle center found inside
110
+* [CB-12546](https://issues.apache.org/jira/browse/CB-12546) leverage `avdmanager` if `android` warns it is no longer useful, which happens in **Android SDK Tools 25.3.1**. Explicitly set the `CWD` of the spawned emulator process to workaround a recent google android sdk bug. Rename `android_sdk_version.js` to `android_sdk.js`, to better reflect its contents. Have `create.js` copy over the `android_sdk_version` batch file.
111
+* [CB-12524](https://issues.apache.org/jira/browse/CB-12524) Fix for missing gradle template error. This now fetches the template from inside of the **Android Studio** directory, and falls back to a locally installed Gradle instance
112
+* [CB-12465](https://issues.apache.org/jira/browse/CB-12465) Writing new JUnit Test Instrumentation to replace tests and retire problmatic tests
113
+
114
+### 6.1.2 (Jan 26, 2017)
115
+* **Security** Change to `https` by default
116
+* [CB-12018](https://issues.apache.org/jira/browse/CB-12018): updated tests to work with jasmine (promise matcher tests commented out for now)
117
+* created directories and corresponding images for `xxhdpi` and `xxxhdpi`, both drawables and `mipmaps`
118
+
119
+### 6.1.1 (Jan 03, 2017)
120
+* [CB-12159](https://issues.apache.org/jira/browse/CB-12159) **Android** Keystore password prompt won't show up
121
+* [CB-12169](https://issues.apache.org/jira/browse/CB-12169) Check for build directory before running a clean
122
+* Fixed `AndroidStudio` tests to actually run, removed `app/src/main/assets/` as a requirement and added `app/src/main/res` instead, added placeholder for `build/` folder, Removed dupe `gitignore`
123
+
124
+### 6.1.0 (Nov 02, 2016)
125
+* [CB-12108](https://issues.apache.org/jira/browse/CB-12108) Updating gradle files to work with the latest version of Android Studio
126
+* [CB-12102](https://issues.apache.org/jira/browse/CB-12102) Bump travis to build to API 25
127
+* Bumping up the version
128
+* [CB-12101](https://issues.apache.org/jira/browse/CB-12101) Fix so that CLI builds don't conflict with Android Studio builds
129
+* [CB-12077](https://issues.apache.org/jira/browse/CB-12077) Fix paths for Android icons/splashscreens
130
+* added framework/build to .ratignore
131
+* Fix for broken testUrl test
132
+* Last minute change of test targets
133
+* Update JS snapshot to version 6.1.0-dev (via coho)
134
+* Set VERSION to 6.1.0-dev (via coho)
135
+
136
+### 6.0.0 (Oct 20, 2016)
137
+
138
+This release adds significant functionality, and also introduces a number
139
+of breaking changes.  Some of the changes to the code base will be of
140
+particular interest to third party webview plugin developers.
141
+
142
+#### Major Changes ####
143
+* Primary bridge is the EVAL_BRIDGE, which tells the WebView to execute JS directly.  This is more stable than the ONLINE_EVENT bridge
144
+* Full Support for Android Nougat (API 24)
145
+* Ice Cream Sandwich Support has been deprecated.  Minimum Supported Android Version is Jellybean (API 16/ Android 4.1)
146
+* Plugin Installation now CLEANS the build directory, this speeds up gradle build times and allows for CLI develoment to be more predictable
147
+
148
+Changes For Third-Party WebView Developers:
149
+* executeJavascript method added and is an abstract method that must be implemented
150
+* the EVAL_BRIDGE must be added to the WebView
151
+
152
+
153
+#### Curated Changes from the Git Commit Logs ####
154
+* Updating the gradle build for test to use the latest
155
+* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Fixing syncronous file check and future-proofing the JS for Travis
156
+* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Reading files to check for CordovaLib dependency, if so, we exclude CordovaLib to be safe
157
+* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Plugin build script for dependencies without a gradle file
158
+* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) The GradleBuidler can tell the difference between a Cordova Plugin Framework and a regular framework based on the name
159
+* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Fix to deal with custom frameworks with their own Gradle configuration
160
+* [CB-12003](https://issues.apache.org/jira/browse/CB-12003) updated node_modules
161
+* [CB-11771](https://issues.apache.org/jira/browse/CB-11771) Deep symlink directories to target project instead of linking the directory itself
162
+* [CB-11880](https://issues.apache.org/jira/browse/CB-11880) android: Fail-safe for cordova.exec()
163
+* [CB-11999](https://issues.apache.org/jira/browse/CB-11999) add message, catch exception if require fails
164
+* fix issue with app_name containing apostrophes
165
+* [CB-8722](https://issues.apache.org/jira/browse/CB-8722) - Move icons from drawable to mipmap
166
+* [CB-11964](https://issues.apache.org/jira/browse/CB-11964) Call clean after plugin install and mock it in tests
167
+* Did a try/catch to deal with the unit tests vs actual project environment, code duplication is needed because of builderEnv
168
+* [CB-11964](https://issues.apache.org/jira/browse/CB-11964) Do a clean when installing a plugin to et around the bug
169
+* [CB-11921](https://issues.apache.org/jira/browse/CB-11921) - Add github pull request template
170
+* [CB-11935](https://issues.apache.org/jira/browse/CB-11935) Does a best-effort attempt to pause any processing that can be paused safely, such as animations and geolocation.
171
+* [CB-11640](https://issues.apache.org/jira/browse/CB-11640) Fixing check_reqs.js so it actually works
172
+* [CB-11640](https://issues.apache.org/jira/browse/CB-11640) Changing requirements check to ask for Java 8
173
+* [CB-11869](https://issues.apache.org/jira/browse/CB-11869) Fix cordova-js android exec tests
174
+* [CB-11907](https://issues.apache.org/jira/browse/CB-11907) Bumping Gradle to work with Android Studio 2.2 and the Android Gradle Plugin
175
+* Enable background start of Cordova Android apps
176
+* fixing jshint issues
177
+* replace Integer.parseInt with BigInteger so that you can use longer Android version codes
178
+* [CB-11828](https://issues.apache.org/jira/browse/CB-11828) Adding dirty userAgent checking to see if we're running Jellybean or not for bridge modes
179
+* [CB-11828](https://issues.apache.org/jira/browse/CB-11828) Switching default bridge back to ONLINE_BRIDGE
180
+* Add gradle build flag to enable dex in process for large projects
181
+* added ability for cordova activity to be viewed in a real full screen regardless of android version (as was the case in previous cordova versions)
182
+* Updating travis
183
+* Adding Static Method to CoreAndroid Plugin so we can get the BuildConfig data from other plugins
184
+* Bump Target and Min API levels
185
+* Make evaluateJavaScript brige default
186
+* Creating an evaluateJavascript branch
187
+* [CB-11727](https://issues.apache.org/jira/browse/CB-11727) - travis ci setup is still using 0.10.32 node
188
+* [CB-11726](https://issues.apache.org/jira/browse/CB-11726) - Update appveyor node versions to 4 and 6, so they will always use the latest versions
189
+* Close invalid PRs
190
+* [CB-11683](https://issues.apache.org/jira/browse/CB-11683) Fixed linking to directories during plugin installation.
191
+* fixed [CB-11078](https://issues.apache.org/jira/browse/CB-11078) Empty string for BackgroundColor preference crashes application This closes #316
192
+* Update JS snapshot to version 5.3.0-dev (via coho)
193
+* Set VERSION to 5.3.0-dev (via coho)
194
+* [CB-11626](https://issues.apache.org/jira/browse/CB-11626) Updated RELEASENOTES and Version for release 5.2.2
195
+* updated cordoova-common to 1.4.0
196
+* This closes #195
197
+* Updaing the gradle for the tests to the latest
198
+* [CB-11550](https://issues.apache.org/jira/browse/CB-11550) Updated RELEASENOTES for release 5.2.1
199
+* [CB-9489](https://issues.apache.org/jira/browse/CB-9489) Fixed "endless waiting for emulator" issue
200
+* Update JS snapshot to version 5.3.0-dev (via coho)
201
+* Set VERSION to 5.3.0-dev (via coho)
202
+* [CB-11444](https://issues.apache.org/jira/browse/CB-11444) Updated RELEASENOTES and Version for release 5.2.0
203
+* [CB-11481](https://issues.apache.org/jira/browse/CB-11481) android-library is deprecated use com.android.library instead
204
+
205
+### 5.2.2 (Jul 26, 2016)
206
+* [CB-11615](https://issues.apache.org/jira/browse/CB-11615) updated `cordoova-common` to `1.4.0`
207
+
208
+### 5.2.1 (Jul 11, 2016)
209
+* [CB-9489](https://issues.apache.org/jira/browse/CB-9489) Fixed "endless waiting for emulator" issue
210
+* [CB-11481](https://issues.apache.org/jira/browse/CB-11481) android-library is deprecated use com.android.library instead
211
+
212
+### 5.2.0 (Jun 29, 2016)
213
+* [CB-11383](https://issues.apache.org/jira/browse/CB-11383) Update to gradle for using `jcenter` and correct Application plugin
214
+* [CB-11365](https://issues.apache.org/jira/browse/CB-11365) fixed plugin rm issue with emit being `undefined`
215
+* [CB-11117](https://issues.apache.org/jira/browse/CB-11117) Use `FileUpdater` to optimize prepare for **android** platform
216
+* [CB-10096](https://issues.apache.org/jira/browse/CB-10096) Upgrade test project to `Gradle Plugin 2.1.0`
217
+* [CB-11292](https://issues.apache.org/jira/browse/CB-11292) fix broken `MessageChannel` after plugins are recreated
218
+* [CB-11259](https://issues.apache.org/jira/browse/CB-11259) Improving build output
219
+* [CB-10096](https://issues.apache.org/jira/browse/CB-10096) Upgrading to `Gradle Plugin 2.1.0`
220
+* [CB-11198](https://issues.apache.org/jira/browse/CB-11198) Skip **android** target sdk check. This closes #303.
221
+* [CB-11138](https://issues.apache.org/jira/browse/CB-11138) Reuse `PluginManager` from `common` to add/rm plugins
222
+* [CB-11133](https://issues.apache.org/jira/browse/CB-11133) Handle **android** emulator start failure
223
+* [CB-11132](https://issues.apache.org/jira/browse/CB-11132) Fix Error: Cannot read property `match` of undefined in `cordova-android` `emulator.js`
224
+* Add simple log for package name being deployed
225
+* [CB-11015](https://issues.apache.org/jira/browse/CB-11015) Error adding plugin with gradle extras
226
+* [CB-11095](https://issues.apache.org/jira/browse/CB-11095) Fix plugin add/removal when running on `Node v.010`
227
+* [CB-11022](https://issues.apache.org/jira/browse/CB-11022) Duplicate www files to both destinations on plugin operations
228
+* [CB-10964](https://issues.apache.org/jira/browse/CB-10964) Handle `build.json` file starting with a BOM.
229
+* [CB-10963](https://issues.apache.org/jira/browse/CB-10963) Handle overlapping permission requests from plugins
230
+* [CB-8582](https://issues.apache.org/jira/browse/CB-8582) Obscure `INSTALL_FAILED_VERSION_DOWNGRADE` error when installing app
231
+* [CB-10862](https://issues.apache.org/jira/browse/CB-10862) Cannot set `minsdkversion`
232
+* [CB-10896](https://issues.apache.org/jira/browse/CB-10896) We never enabled cookies on the `WebView` proper
233
+* [CB-10837](https://issues.apache.org/jira/browse/CB-10837) Support platform-specific orientation on **Android**
234
+* [CB-10600](https://issues.apache.org/jira/browse/CB-10600) `cordova run android --release` does not use signed and zip-aligned version of `APK`
235
+* [CB-9710](https://issues.apache.org/jira/browse/CB-9710) Fixing issues parsing `android avd list` output for certain AVDs which resulted in them not being included in the selection process even if they are the best match.
236
+* [CB-10888](https://issues.apache.org/jira/browse/CB-10888) Enable coverage reports collection via codecov
237
+* [CB-10846](https://issues.apache.org/jira/browse/CB-10846) Add Travis and AppVeyor badges to readme
238
+* [CB-10846](https://issues.apache.org/jira/browse/CB-10846) Add AppVeyor configuration
239
+* [CB-10749](https://issues.apache.org/jira/browse/CB-10749) Use `cordova-common.CordovaLogger` in `cordova-android`
240
+* [CB-10673](https://issues.apache.org/jira/browse/CB-10673) fixed conflicting plugin install issue with overlapped `<source-file>` tag. Add `--force` flag.
241
+* [CB-8976](https://issues.apache.org/jira/browse/CB-8976) Removing the auto-version for non-Crosswalk applications
242
+* [CB-10768](https://issues.apache.org/jira/browse/CB-10768) Use `cordova-common.superspawn` in `GradleBuilder`
243
+* [CB-10729](https://issues.apache.org/jira/browse/CB-10729) Move plugin handlers tests for into platform's repo
244
+* [CB-10669](https://issues.apache.org/jira/browse/CB-10669) `cordova run --list` cannot find `adb`
245
+* [CB-10660](https://issues.apache.org/jira/browse/CB-10660) fixed the exception when removing a non-existing directory.
246
+
247
+### 5.1.1 (Feb 24, 2016)
248
+* updated `cordova-common` dependnecy to `1.1.0`
249
+* [CB-10628](https://issues.apache.org/jira/browse/CB-10628) Fix `emulate android --target`
250
+* [CB-10618](https://issues.apache.org/jira/browse/CB-10618) Handle gradle frameworks on plugin installation/uninstallation
251
+* [CB-10510](https://issues.apache.org/jira/browse/CB-10510) Add an optional timeout to `emu` start script
252
+* [CB-10498](https://issues.apache.org/jira/browse/CB-10498) Resume event should be sticky if it has a plugin result
253
+* fix `HtmlNotFoundTest` so that it passes when file not found is handled correctly
254
+* [CB-10472](https://issues.apache.org/jira/browse/CB-10472) `NullPointerException`: `org.apache.cordova.PluginManager.onSaveInstanceState` check if `pluginManager` is `null` before using it
255
+* [CB-10138](https://issues.apache.org/jira/browse/CB-10138) Adds missing plugin metadata to `plugin_list` module.
256
+* [CB-10443](https://issues.apache.org/jira/browse/CB-10443) Pass original options instead of remaining
257
+* [CB-10443](https://issues.apache.org/jira/browse/CB-10443) Fix `this.root` null reference
258
+* [CB-10421](https://issues.apache.org/jira/browse/CB-10421) Fixes exception when calling run script with `--help` option
259
+* updated `.gitignore`
260
+* [CB-10406](https://issues.apache.org/jira/browse/CB-10406) Fixes an exception, thrown when building using Ant.
261
+* [CB-10157](https://issues.apache.org/jira/browse/CB-10157) Uninstall app from device/emulator only when signed apk is already installed
262
+
263
+### 5.1.0 (Jan 19, 2016)
264
+* [CB-10386](https://issues.apache.org/jira/browse/CB-10386) Add `android.useDeprecatedNdk=true` to support `NDK` in `gradle`
265
+* [CB-8864](https://issues.apache.org/jira/browse/CB-8864) Fixing this to mitigate [CB-8685](https://issues.apache.org/jira/browse/CB-8685) and [CB-10104](https://issues.apache.org/jira/browse/CB-10104)
266
+* [CB-10105](https://issues.apache.org/jira/browse/CB-10105) Spot fix for tilde errors on paths.
267
+* Update theme to `Theme.DeviceDefault.NoActionBar`
268
+* [CB-10014](https://issues.apache.org/jira/browse/CB-10014) Set gradle `applicationId` to `package name`.
269
+* [CB-9949](https://issues.apache.org/jira/browse/CB-9949) Fixing menu button event not fired in **Android**
270
+* [CB-9479](https://issues.apache.org/jira/browse/CB-9479) Fixing the conditionals again, we should
271
+* [CB-8917](https://issues.apache.org/jira/browse/CB-8917) New Plugin API for passing results on resume after Activity destruction
272
+* [CB-9971](https://issues.apache.org/jira/browse/CB-9971) Suppress `gradlew _JAVA_OPTIONS` output during build
273
+* [CB-9836](https://issues.apache.org/jira/browse/CB-9836) Add `.gitattributes` to prevent `CRLF` line endings in repos
274
+* added node_modules back into `.gitignore`
275
+
276
+### 5.0.0 (Nov 01, 2015)
277
+* Update CordovaWebViewEngine.java
278
+* [CB-9909](https://issues.apache.org/jira/browse/CB-9909) Shouldn't escape spaces in paths on Windows.
279
+* [CB-9870](https://issues.apache.org/jira/browse/CB-9870) updated hello world template
280
+* [CB-9880](https://issues.apache.org/jira/browse/CB-9880) Fixes platform update failure when upgrading from android@<4.1.0
281
+* [CB-9844](https://issues.apache.org/jira/browse/CB-9844) Remove old .java after renaming activity
282
+* [CB-9800](https://issues.apache.org/jira/browse/CB-9800) Fixing contribute link.
283
+* [CB-9782](https://issues.apache.org/jira/browse/CB-9782) Check in `cordova-common` dependency
284
+* Adds licence header to Adb to pass rat audit
285
+* [CB-9835](https://issues.apache.org/jira/browse/CB-9835) Downgrade `properties-parser` to prevent failures in Node < 4.x
286
+* [CB-9782](https://issues.apache.org/jira/browse/CB-9782) Implements PlatformApi contract for Android platform.
287
+* [CB-9826](https://issues.apache.org/jira/browse/CB-9826) Fixed `test-build` script on windows.
288
+* Refactor of the Cordova Plugin/Permissions API
289
+* Manually updating version to 5.0.0-dev for engine tags
290
+* Bump up to API level 23
291
+* Commiting code to handle permissions, and the special case of the Geolocation Plugin
292
+* [CB-9608](https://issues.apache.org/jira/browse/CB-9608) cordova-android no longer builds on Node 0.10 or below
293
+* [CB-9080](https://issues.apache.org/jira/browse/CB-9080) Cordova CLI run for Android versions 4.1.1 and lower throws error
294
+* [CB-9557](https://issues.apache.org/jira/browse/CB-9557) Fixes apk install failure when switching from debug to release build
295
+* [CB-9496](https://issues.apache.org/jira/browse/CB-9496) removed permissions added for crosswalk
296
+* [CB-9402](https://issues.apache.org/jira/browse/CB-9402) Allow to set gradle distubutionUrl via env variable CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL
297
+* [CB-9428](https://issues.apache.org/jira/browse/CB-9428) update script now bumps up minSdkVersion to 14 if it is less than that.
298
+* [CB-9430](https://issues.apache.org/jira/browse/CB-9430) Fixes check_reqs failure when javac returns an extra line
299
+* [CB-9172](https://issues.apache.org/jira/browse/CB-9172) Improved emulator deploy stability. This closes #188.
300
+* [CB-9404](https://issues.apache.org/jira/browse/CB-9404) Fixed an exception when path contained -debug or -release
301
+* [CB-8320](https://issues.apache.org/jira/browse/CB-8320) Setting up gradle so we can use CordovaLib as a standard Android Library
302
+* [CB-9185](https://issues.apache.org/jira/browse/CB-9185) Fixed an issue when unsigned apks couldn't be found.
303
+* [CB-9397](https://issues.apache.org/jira/browse/CB-9397) Fixes minor issues with `cordova requirements android`
304
+* [CB-9389](https://issues.apache.org/jira/browse/CB-9389) Fixes build/check_reqs hang
305
+
306
+### Release 4.1.1 (Aug 2015) ###
307
+
308
+* [CB-9428](https://issues.apache.org/jira/browse/CB-9428) update script now bumps up minSdkVersion to 14 if it is less than that
309
+* [CB-9430](https://issues.apache.org/jira/browse/CB-9430) Fixes check_reqs failure when javac returns an extra line
310
+
311
+### Release 4.1.0 (Jul 2015) ###
312
+* [CB-9392](https://issues.apache.org/jira/browse/CB-9392) Fixed printing flavored versions. This closes #184.
313
+* [CB-9382](https://issues.apache.org/jira/browse/CB-9382) [Android] Fix KeepRunning setting when Plugin activity is showed. This closes #200
314
+* [CB-9391](https://issues.apache.org/jira/browse/CB-9391) Fixes cdvBuildMultipleApks option casting
315
+* [CB-9343](https://issues.apache.org/jira/browse/CB-9343) Split the Content-Type to obtain a clean mimetype
316
+* [CB-9255](https://issues.apache.org/jira/browse/CB-9255) Make getUriType case insensitive.
317
+* [CB-9149](https://issues.apache.org/jira/browse/CB-9149) Fixes JSHint issue introduced by 899daa9
318
+* [CB-9372](https://issues.apache.org/jira/browse/CB-9372) Remove unused files: 'main.js' & 'master.css'. This closes #198
319
+* [CB-9149](https://issues.apache.org/jira/browse/CB-9149) Make gradle alias subprojects in order to handle libs that depend on libs. This closes #182
320
+* Update min SDK version to 14
321
+* Update licenses. This closes #190
322
+* [CB-9185](https://issues.apache.org/jira/browse/CB-9185) Fix signed release build exception. This closes #193.
323
+* [CB-9286](https://issues.apache.org/jira/browse/CB-9286) Fixes build failure when ANDROID_HOME is not set.
324
+* [CB-9284](https://issues.apache.org/jira/browse/CB-9284) Fix for handling absolute path for keystore in build.json
325
+* [CB-9260](https://issues.apache.org/jira/browse/CB-9260) Install Android-22 on Travis-CI
326
+* Adding .ratignore file.
327
+* [CB-9119](https://issues.apache.org/jira/browse/CB-9119) Adding lib/retry.js for retrying promise-returning functions. Retrying 'adb install' in emulator.js because it sometimes hangs.
328
+* [CB-9115](https://issues.apache.org/jira/browse/CB-9115) android: Grant Lollipop permission req
329
+* Remove extra console message
330
+* [CB-8898](https://issues.apache.org/jira/browse/CB-8898) Report expected gradle location properly
331
+* [CB-8898](https://issues.apache.org/jira/browse/CB-8898) Fixes gradle check failure due to missing quotes
332
+* [CB-9080](https://issues.apache.org/jira/browse/CB-9080) -d option is not supported on Android 4.1.1 and lower, removing
333
+* [CB-8954](https://issues.apache.org/jira/browse/CB-8954) Adds `requirements` command support to check_reqs module
334
+* Update JS snapshot to version 4.1.0-dev (via coho)
335
+* [CB-8417](https://issues.apache.org/jira/browse/CB-8417) updated platform specific files from cordova.js repo
336
+* Adding tests to confirm that preferences aren't changed by Intents
337
+* Forgot to remove the method that copied over the intent data
338
+* Getting around to removing this old Intent code
339
+* Update JS snapshot to version 4.1.0-dev (via coho)
340
+* Fix CordovaPluginTest on KitKat (start-up events seem to change)
341
+* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Allow setting a custom User-Agent (close #162)
342
+* [CB-8902](https://issues.apache.org/jira/browse/CB-8902) Use immersive mode when available when going fullscreen (close #175)
343
+* Make BridgeMode methods public (they were always supposed to be)
344
+* Simplify: EncodingUtils.getBytes(str) -> str.getBytes()
345
+* Don't show warning when gradlew file is read-only
346
+* Don't show warning when prepEnv copies gradlew and it's read-only
347
+* Make gradle wrapper prepEnv code work even when android-sdk is read-only
348
+* [CB-8897](https://issues.apache.org/jira/browse/CB-8897) Delete drawable/icon.png since it duplicates drawable-mdpi/icon.png
349
+* Updating the template to target mininumSdkTarget=14
350
+* [CB-8894](https://issues.apache.org/jira/browse/CB-8894) Updating the template to target mininumSdkTarget=14
351
+* [CB-8891](https://issues.apache.org/jira/browse/CB-8891) Add a note about when the gradle helpers were added
352
+* [CB-8891](https://issues.apache.org/jira/browse/CB-8891) Add a gradle helper for retrieving config.xml preference values
353
+* [CB-8884](https://issues.apache.org/jira/browse/CB-8884) Delete Eclipse tweaks from create script
354
+* [CB-8834](https://issues.apache.org/jira/browse/CB-8834) Don't fail to install on VERSION_DOWNGRADE
355
+* Automated tools fail, and you have to remember all four places where this is set.
356
+* Update the package.json
357
+* [CB-9042](https://issues.apache.org/jira/browse/CB-9042) coho failed to update version, so here we are
358
+* CB9042 - Updating Release Notes
359
+* Adding tests to confirm that preferences aren't changed by Intents
360
+* updating existing test code
361
+* Forgot to remove the method that copied over the intent data
362
+* Getting around to removing this old Intent code
363
+* [CB-8834](https://issues.apache.org/jira/browse/CB-8834) Don't fail to install on VERSION_DOWNGRADE
364
+
365
+### Release 4.0.2 (May 2015) ###
366
+
367
+* Removed Intent Functionality from Preferences - Preferences can no longer be set by intents
368
+
369
+### Release 4.0.1 (April 2015) ###
370
+
371
+* Bug fixed where platform failed to install on a version downgrade
372
+
373
+### Release 4.0.0 (March 2015) ###
374
+
375
+This release adds significant functionality, and also introduces a number
376
+of breaking changes.  Some of the changes to the code base will be of
377
+particular interest to plugin developers.
378
+
379
+#### Major Changes ####
380
+* Support for pluggable WebViews
381
+  * The system WebView can be replaced in your app, via a plugin
382
+  * Core WebView functionality is encapsulated, with extension points exposed
383
+    via interfaces
384
+* Support for Crosswalk to bring the modern Chromium WebView to older devices
385
+  * Uses the pluggable WebView framework
386
+  * You will need to add the new [cordova-crosswalk-engine](https://github.com/MobileChromeApps/cordova-crosswalk-engine) plugin
387
+* Splash screen functionality is now provided via plugin
388
+  * You will need to add the new [cordova-plugin-splashscreen](https://github.com/apache/cordova-plugin-splashscreen) plugin to continue using a splash screen
389
+* Whitelist functionality is now provided via plugin (CB-7747)
390
+  * The whitelist has been enhanced to be more secure and configurable
391
+  * Setting of Content-Security-Policy is now supported by the framework (see details in plugin readme)
392
+  * You will need to add the new [cordova-plugin-whitelist](https://github.com/apache/cordova-plugin-whitelist) plugin
393
+  * Legacy whitelist behaviour is still available via plugin (although not recommended).
394
+
395
+Changes For Plugin Developers:
396
+
397
+* Develop in Android Studio
398
+  * Android Studio is now fully supported, and recommended over Eclipse
399
+* Build using Gradle
400
+  * All builds [use Gradle by default](Android%20Shell%20Tool%20Guide_building_with_gradle), instead of Ant
401
+  * Plugins can add their own gradle build steps!
402
+  * Plugins can depend on Maven libraries using `<framework>` tags
403
+* New APIs: `onStart`, `onStop`, `onConfigurationChanged`
404
+* `"onScrollChanged"` message removed. Use `view.getViewTreeObserver().addOnScrollChangedListener(...)` instead
405
+* [CB-8702](https://issues.apache.org/jira/browse/CB-8702) New API for plugins to override `shouldInterceptRequest` with a stream
406
+
407
+#### Other Changes ####
408
+* [CB-8378](https://issues.apache.org/jira/browse/CB-8378) Removed `hidekeyboard` and `showkeyboard` events (apps should use a plugin instead)
409
+* [CB-8735](https://issues.apache.org/jira/browse/CB-8735) `bin/create` regex relaxed / better support for numbers
410
+* [CB-8699](https://issues.apache.org/jira/browse/CB-8699) Fix CordovaResourceApi `copyResource` creating zero-length files when src=uncompressed asset
411
+* [CB-8693](https://issues.apache.org/jira/browse/CB-8693) CordovaLib should not contain icons / splashscreens
412
+* [CB-8592](https://issues.apache.org/jira/browse/CB-8592) Fix NPE if lifecycle events reach CordovaWebView before `init()` has been called
413
+* [CB-8588](https://issues.apache.org/jira/browse/CB-8588) Add CATEGORY_BROWSABLE to intents from showWebPage openExternal=true
414
+* [CB-8587](https://issues.apache.org/jira/browse/CB-8587) Don't allow WebView navigations within showWebPage that are not whitelisted
415
+* [CB-7827](https://issues.apache.org/jira/browse/CB-7827) Add `--activity-name` for `bin/create`
416
+* [CB-8548](https://issues.apache.org/jira/browse/CB-8548) Use debug-signing.properties and release-signing.properties when they exist
417
+* [CB-8545](https://issues.apache.org/jira/browse/CB-8545) Don't add a layout as a parent of the WebView
418
+* [CB-7159](https://issues.apache.org/jira/browse/CB-7159) BackgroundColor not used when `<html style="opacity:0">`, nor during screen rotation
419
+* [CB-6630](https://issues.apache.org/jira/browse/CB-6630) Removed OkHttp from core library. It's now available as a plugin: [cordova-plugin-okhttp](https://www.npmjs.com/package/cordova-plugin-okhttp)
420
+
421
+### Release 3.7.1 (January 2015) ###
422
+* [CB-8411](https://issues.apache.org/jira/browse/CB-8411) Initialize plugins only after `createViews()` is called (regression in 3.7.0)
423
+
424
+### Release 3.7.0 (January 2015) ###
425
+
426
+* [CB-8328](https://issues.apache.org/jira/browse/CB-8328) Allow plugins to handle certificate challenges (close #150)
427
+* [CB-8201](https://issues.apache.org/jira/browse/CB-8201) Add support for auth dialogs into Cordova Android
428
+* [CB-8017](https://issues.apache.org/jira/browse/CB-8017) Add support for `<input type=file>` for Lollipop
429
+* [CB-8143](https://issues.apache.org/jira/browse/CB-8143) Loads of gradle improvements (try it with cordova/build --gradle)
430
+* [CB-8329](https://issues.apache.org/jira/browse/CB-8329) Cancel outstanding ActivityResult requests when a new startActivityForResult occurs
431
+* [CB-8026](https://issues.apache.org/jira/browse/CB-8026) Bumping up Android Version and setting it up to allow third-party cookies.  This might change later.
432
+* [CB-8210](https://issues.apache.org/jira/browse/CB-8210) Use PluginResult for various events from native so that content-security-policy <meta> can be used
433
+* [CB-8168](https://issues.apache.org/jira/browse/CB-8168) Add support for `cordova/run --list` (closes #139)
434
+* [CB-8176](https://issues.apache.org/jira/browse/CB-8176) Vastly better auto-detection of SDK & JDK locations
435
+* [CB-8079](https://issues.apache.org/jira/browse/CB-8079) Use activity class package name, but fallback to application package name when looking for splash screen drawable
436
+* [CB-8147](https://issues.apache.org/jira/browse/CB-8147) Have corodva/build warn about unrecognized flags rather than fail
437
+* [CB-7881](https://issues.apache.org/jira/browse/CB-7881) Android tooling shouldn't lock application directory
438
+* [CB-8112](https://issues.apache.org/jira/browse/CB-8112) Turn off mediaPlaybackRequiresUserGesture
439
+* [CB-6153](https://issues.apache.org/jira/browse/CB-6153) Add a preference for controlling hardware button audio stream (DefaultVolumeStream)
440
+* [CB-8031](https://issues.apache.org/jira/browse/CB-8031) Fix race condition that shows as ConcurrentModificationException
441
+* [CB-7974](https://issues.apache.org/jira/browse/CB-7974) Cancel timeout timer if view is destroyed
442
+* [CB-7940](https://issues.apache.org/jira/browse/CB-7940) Disable exec bridge if bridgeSecret is wrong
443
+* [CB-7758](https://issues.apache.org/jira/browse/CB-7758) Allow content-url-hosted pages to access the bridge
444
+* [CB-6511](https://issues.apache.org/jira/browse/CB-6511) Fixes build for android when app name contains unicode characters.
445
+* [CB-7707](https://issues.apache.org/jira/browse/CB-7707) Added multipart PluginResult
446
+* [CB-6837](https://issues.apache.org/jira/browse/CB-6837) Fix leaked window when hitting back button while alert being rendered
447
+* [CB-7674](https://issues.apache.org/jira/browse/CB-7674) Move preference activation back into onCreate()
448
+* [CB-7499](https://issues.apache.org/jira/browse/CB-7499) Support RTL text direction
449
+* [CB-7330](https://issues.apache.org/jira/browse/CB-7330) Don't run check_reqs for bin/create.
450
+
451
+### 3.6.4 (Sept 30, 2014) ###
452
+
453
+* Set VERSION to 3.6.4 (via coho)
454
+* Update JS snapshot to version 3.6.4 (via coho)
455
+* [CB-7634](https://issues.apache.org/jira/browse/CB-7634) Detect JAVA_HOME properly on Ubuntu
456
+* [CB-7579](https://issues.apache.org/jira/browse/CB-7579) Fix run script's ability to use non-arch-specific APKs
457
+* [CB-6511](https://issues.apache.org/jira/browse/CB-6511) Fixes build for android when app name contains unicode characters.
458
+* [CB-7463](https://issues.apache.org/jira/browse/CB-7463) Adding licences.  I don't know what the gradle syntax is for comments, that still needs to be done.
459
+* [CB-7463](https://issues.apache.org/jira/browse/CB-7463) Looked at the Apache BigTop git, gradle uses C-style comments
460
+* [CB-7460](https://issues.apache.org/jira/browse/CB-7460) Fixing bug with KitKat where the background colour would override the CSS colours on the application
461
+
462
+### 3.6.0 (Sept 2014) ###
463
+
464
+* Set VERSION to 3.6.0 (via coho)
465
+* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) fix the menu test
466
+* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) Fix the errorUrl test
467
+* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) Fix Basic Authentication test
468
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Allow build and run scripts to select APK by architecture
469
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add environment variable 'BUILD_MULTIPLE_APKS' for splitting APKs based on architecture
470
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Ensure that JAR files in libs directory are included
471
+* [CB-7267](https://issues.apache.org/jira/browse/CB-7267) update RELEASENOTES for 3.5.1
472
+* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) clarify the title
473
+* [CB-7385](https://issues.apache.org/jira/browse/CB-7385) update cordova.js for testing prior to branch/tag
474
+* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) add whitelist entries to get iframe/GoogleMaps working
475
+* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) propogate change in method signature to the native tests
476
+* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) Restrict meaning of "\*" in internal whitelist to just http and https
477
+* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) Only add file, content and data URLs to internal whitelist
478
+* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) Add defaults to external whitelist
479
+* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) Add external-launch-whitelist and use it for filtering intent launches
480
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Read project.properties to configure gradle libraries
481
+* [CB-7325](https://issues.apache.org/jira/browse/CB-7325) Fix error message in android_sdk_version.js when missing SDK on windows
482
+* [CB-7335](https://issues.apache.org/jira/browse/CB-7335) Add a .gitignore to android project template
483
+* [CB-7330](https://issues.apache.org/jira/browse/CB-7330) Fix dangling function call in last commit (broke gradle builds)
484
+* [CB-7330](https://issues.apache.org/jira/browse/CB-7330) Don't run "android update" during creation
485
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add gradle support clean command (plus some code cleanup)
486
+* [CB-7044](https://issues.apache.org/jira/browse/CB-7044) Fix typo in prev commit causing check_reqs to always fail.
487
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Copy gradle wrapper in build instead of create
488
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add .gradle template files for "update" as well as "create"
489
+* [CB-7044](https://issues.apache.org/jira/browse/CB-7044) Add JAVA_HOME when not set. Be stricter about ANDROID_HOME
490
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Speed up gradle building (incremental builds go from 10s -> 1.5s for me)
491
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) android: Copy Gradle wrapper from Android SDK rather than bundling a JAR
492
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add which to checked-in node_modules
493
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add option to build and install with gradle
494
+* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add an initial set of Gradle build scripts
495
+* [CB-7321](https://issues.apache.org/jira/browse/CB-7321) Don't require ant for create script
496
+* CB-7044, [CB-7299](https://issues.apache.org/jira/browse/CB-7299) Fix up PATH problems when possible.
497
+* Change in test's AndroidManifest.xml needed for the test to run properly. Forgot the manifest.
498
+* Change in test's AndroidManifest.xml needed for the test to run properly
499
+* Adding tests related to 3.5.1
500
+* [CB-7261](https://issues.apache.org/jira/browse/CB-7261) Fix setNativeToJsBridgeMode sometimes crashing when switching to ONLINE_EVENT
501
+* [CB-7265](https://issues.apache.org/jira/browse/CB-7265) Fix crash when navigating to custom protocol (introduced in 3.5.1)
502
+* Filter out non-launchable intents
503
+* Handle unsupported protocol errors in webview better
504
+* [CB-7238](https://issues.apache.org/jira/browse/CB-7238) I should have collapsed this, but Config.init() must go before the creation of CordovaWebView
505
+* [CB-7238](https://issues.apache.org/jira/browse/CB-7238) Minor band-aid to get tests running again, this has to go away before 3.6.0 is released, since this is an API change.
506
+* Extend whitelist to handle URLs without // chars
507
+* [CB-7172](https://issues.apache.org/jira/browse/CB-7172) Force window to have focus after resume
508
+* [CB-7159](https://issues.apache.org/jira/browse/CB-7159) Set background color of webView as well as its parent
509
+* [CB-7018](https://issues.apache.org/jira/browse/CB-7018) Fix setButtonPlumbedToJs never un-listening
510
+* Undeprecate some just-deprecated symbols in PluginManager.
511
+* @Deprecate methods of PluginManager that were never meant to be public
512
+* Move plugin instantiation and instance storing logic PluginEntry->PluginManager
513
+* Fix broken unit test due to missing Config.init() call
514
+* Update to check for Google Glass APIs
515
+* Fix for `android` not being in PATH check on Windows
516
+* Displaying error when regex does not match.
517
+* Fix broken compile due to previous commit :(
518
+* Tweak CordovaPlugin.initialize method to be less deprecated.
519
+* Un-deprecate CordovaActivity.init() - it's needed to tweak prefs in onCreate
520
+* Tweak log messages in CordovaBridge with bridgeSecret is wrong
521
+* Backport CordovaBridge from 4.0.x -> master
522
+* Update unit tests to not use most deprecated things (e.g. DroidGap)
523
+* Add non-String overloades for CordovaPreferences.set()
524
+* Make CordovaWebview resilient to init() not being called (for backwards-compatibility)
525
+* Add node_module licenses to LICENSE
526
+* Update cordova.js snapshot to work with bridge changes
527
+* Provide CordovaPlugin with CordovaPreferences. Add new Plugin.initialize()
528
+* Convert usages of Config.\* to use the non-static versions
529
+* Change getProperty -> prefs.get\* within CordovaActivity
530
+* Make CordovaUriHelper class package-private
531
+* Fix PluginManager.setPluginEntries not removing old entries
532
+* Move registration of App plugin from config.xml -> code
533
+* Make setWebViewClient an override instead of an overload. Delete Location-change JS->Native bridge mode (missed some of it).
534
+* [CB-4404](https://issues.apache.org/jira/browse/CB-4404) Revert setting android:windowSoftInputMode to "adjustPan"
535
+* Refactor: Use ConfigXmlParser in activity. Adds CordovaWebView.init()
536
+* Deprecate some convenience methods on CordovaActivity
537
+* Fix CordovaPreferences not correctly parsing hex values (valueOf->decode)
538
+* Refactor: Move url-filter information into PluginEntry.
539
+* Don't re-parse config.xml in onResume.
540
+* Move handling of Fullscreen preference to CordovaActivity
541
+* Delete dead code from CordovaActivity
542
+* Update .classpath to make Eclipse happy (just re-orders one line)
543
+* Delete "CB-3064: The errorUrl is..." Log message left over from debugging presumably
544
+* Refactor Config into ConfigXmlParser, CordovaPreferences
545
+* Delete Location-change JS->Native bridge mode
546
+* [CB-5988](https://issues.apache.org/jira/browse/CB-5988) Allow exec() only from file: or start-up URL's domain
547
+* [CB-6761](https://issues.apache.org/jira/browse/CB-6761) Fix native->JS bridge ceasing to fire when page changes and online is set to false and the JS loads quickly
548
+* Update the errorurl to no longer use intents
549
+* This breaks running the JUnit tests, we'll bring it back soon
550
+* Refactoring the URI handling on Cordova, removing dead code
551
+* [CB-7018](https://issues.apache.org/jira/browse/CB-7018) Clean up and deprecation of some button-related functions
552
+* [CB-7017](https://issues.apache.org/jira/browse/CB-7017) Fix onload=true being set on all subsequent plugins
553
+* [CB-5971](https://issues.apache.org/jira/browse/CB-5971) Fix package / project validation
554
+* [CB-5971](https://issues.apache.org/jira/browse/CB-5971) Add unit tests to cordova-android
555
+* [CB-5971](https://issues.apache.org/jira/browse/CB-5971) Factor out package/project name validation logic
556
+* Delete explicit activity.finish() in back button handling. No change in behaviour.
557
+* [CB-5971](https://issues.apache.org/jira/browse/CB-5971) This would have been a good first bug, too bad
558
+* [CB-4404](https://issues.apache.org/jira/browse/CB-4404) Changing where android:windowSoftInputMode is in the manifest so it works
559
+* Add documentation referencing other implementation.
560
+* [CB-6851](https://issues.apache.org/jira/browse/CB-6851) Deprecate WebView.sendJavascript()
561
+* [CB-6876](https://issues.apache.org/jira/browse/CB-6876) Show the correct executable name
562
+* [CB-6876](https://issues.apache.org/jira/browse/CB-6876) Fix the "print usage"
563
+* Trivial spelling fix in comments when reading CordovaResourceApi
564
+* [CB-6818](https://issues.apache.org/jira/browse/CB-6818) I want to remove this code, because Square didn't do their headers properly
565
+* [CB-6860](https://issues.apache.org/jira/browse/CB-6860) Add activity_name and launcher_name to AndroidManifest.xml & strings.xml
566
+* Add a comment to custom_rules.xml saying why we move AndroidManifest.xml
567
+* Remove +x from README.md
568
+* [CB-6784](https://issues.apache.org/jira/browse/CB-6784) Add missing licenses
569
+* [CB-6784](https://issues.apache.org/jira/browse/CB-6784) Add license to CONTRIBUTING.md
570
+* Revert "defaults.xml: Add AndroidLaunchMode preference"
571
+* updated RELEASENOTES
572
+* [CB-6315](https://issues.apache.org/jira/browse/CB-6315) Wrapping this so it runs on the UI thread
573
+* [CB-6723](https://issues.apache.org/jira/browse/CB-6723) Update package name for Robotium
574
+* [CB-6707](https://issues.apache.org/jira/browse/CB-6707) Update minSdkVersion to 10 consistently
575
+* [CB-5652](https://issues.apache.org/jira/browse/CB-5652) make visible cordova version
576
+* Update JS snapshot to version 3.6.0-dev (via coho)
577
+* Update JS snapshot to version 3.6.0-dev (via coho)
578
+* Set VERSION to 3.6.0-dev (via coho)
579
+
580
+### 3.5.1 (August 2014) ###
581
+
582
+This was a security update to address CVE-2014-3500, CVE-2014-3501,
583
+and CVE-2014-3502. For more information, see
584
+http://cordova.apache.org/announcements/2014/08/04/android-351.html
585
+
586
+* Filter out non-launchable intents
587
+* Handle unsupported protocol errors in webview better
588
+* Update the errorurl to no longer use intents
589
+* Refactoring the URI handling on Cordova, removing dead code
590
+
591
+### 3.5.0 (May 2014) ###
592
+
593
+* OkHttp has broken headers. Updating for ASF compliance.
594
+* Revert accidentally removed lines from NOTICE
595
+* [CB-6552](https://issues.apache.org/jira/browse/CB-6552) added top level package.json
596
+* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md
597
+* [CB-6543](https://issues.apache.org/jira/browse/CB-6543) Fix cordova/run failure when no custom_rules.xml available
598
+* defaults.xml: Add AndroidLaunchMode preference
599
+* Add JavaDoc for CordovaResourceApi
600
+* [CB-6388](https://issues.apache.org/jira/browse/CB-6388) Handle binary data correctly in LOAD_URL bridge
601
+* Fix [CB-6048](https://issues.apache.org/jira/browse/CB-6048) Set launchMode=singleTop so tapping app icon does not always restart app
602
+* Remove incorrect usage of AlertDialog.Builder.create
603
+* Catch uncaught exceptions in from plugins and turn them into error responses.
604
+* Add NOTICE file
605
+* [CB-6047](https://issues.apache.org/jira/browse/CB-6047) Fix online sometimes getting in a bad state on page transitions.
606
+* Add another convenience overload for CordovaResourceApi.copyResource
607
+* Update framework's .classpath to what Eclipse wants it to be.
608
+* README.md: `android update` to `android-19`.
609
+* Fix NPE when POLLING bridge mode is used.
610
+* Updating NOTICE to include Square for OkHttp
611
+* [CB-5398](https://issues.apache.org/jira/browse/CB-5398) Apply KitKat content URI fix to all content URIs
612
+* [CB-5398](https://issues.apache.org/jira/browse/CB-5398) Work-around for KitKat content: URLs not rendering in <img> tags
613
+* [CB-5908](https://issues.apache.org/jira/browse/CB-5908) add splascreen images to template
614
+* [CB-5395](https://issues.apache.org/jira/browse/CB-5395) Make scheme and host (but not path) case-insensitive in whitelist
615
+* Ignore multiple onPageFinished() callbacks & onReceivedError due to stopLoading()
616
+* Removing addJavascriptInterface support from all Android versions lower than 4.2 due to security vu
617
+* [CB-4984](https://issues.apache.org/jira/browse/CB-4984) Don't create on CordovaActivity name
618
+* [CB-5917](https://issues.apache.org/jira/browse/CB-5917) Add a loadUrlIntoView overload that doesn't recreate plugins.
619
+* Use thread pool for load timeout.
620
+* [CB-5715](https://issues.apache.org/jira/browse/CB-5715) For CLI, hide assets/www and res/xml/config.xml by default
621
+* [CB-5793](https://issues.apache.org/jira/browse/CB-5793) ant builds: Rename AndroidManifest during -post-build to avoid Eclipse detecting ant-build/
622
+* [CB-5889](https://issues.apache.org/jira/browse/CB-5889) Make update script find project name instead of using "null" for CordovaLib
623
+* [CB-5889](https://issues.apache.org/jira/browse/CB-5889) Add a message in the update script about needing to import CordovaLib when using an IDE.
624
+
625
+### 3.4.0 (Feb 2014) ###
626
+
627
+43 commits from 10 authors. Highlights include:
628
+
629
+* Removing addJavascriptInterface support from all Android versions lower than 4.2 due to security vulnerability
630
+* [CB-5917](https://issues.apache.org/jira/browse/CB-5917) Add a loadUrlIntoView overload that doesn't recreate plugins.
631
+* [CB-5889](https://issues.apache.org/jira/browse/CB-5889) Make update script find project name instead of using "null" for CordovaLib
632
+* [CB-5889](https://issues.apache.org/jira/browse/CB-5889) Add a message in the update script about needing to import CordovaLib when using an IDE.
633
+* [CB-5793](https://issues.apache.org/jira/browse/CB-5793) Don't clean before build and change output directory to ant-build to avoid conflicts with Eclipse.
634
+* [CB-5803](https://issues.apache.org/jira/browse/CB-5803) Fix cordova/emulate on windows.
635
+* [CB-5801](https://issues.apache.org/jira/browse/CB-5801) exec->spawn in build to make sure compile errors are shown.
636
+* [CB-5799](https://issues.apache.org/jira/browse/CB-5799) Update version of OkHTTP to 1.3
637
+* [CB-4910](https://issues.apache.org/jira/browse/CB-4910) Update CLI project template to point to config.xml at the root now that it's not in www/ by default.
638
+* [CB-5504](https://issues.apache.org/jira/browse/CB-5504) Adding onDestroy to app plugin to deregister telephonyReceiver
639
+* [CB-5715](https://issues.apache.org/jira/browse/CB-5715) Add Eclipse .project file to create template. For CLI projects, it adds refs for root www/ & config.xml and hides platform versions
640
+* [CB-5447](https://issues.apache.org/jira/browse/CB-5447) Removed android:debuggable=“true” from project template.
641
+* [CB-5714](https://issues.apache.org/jira/browse/CB-5714) Fix of android build when too big output stops build with error due to buffer overflow.
642
+* [CB-5592](https://issues.apache.org/jira/browse/CB-5592) Set MIME type for openExternal when scheme is file:
643
+
644
+### 3.3.0 (Dec 2013) ###
645
+
646
+41 commits from 11 authors. Highlights include:
647
+
648
+* [CB-5481](https://issues.apache.org/jira/browse/CB-5481) Fix for Cordova trying to get config.xml from the wrong namespace
649
+* [CB-5487](https://issues.apache.org/jira/browse/CB-5487) Enable Remote Debugging when your Android app is debuggable.
650
+* [CB-5445](https://issues.apache.org/jira/browse/CB-5445) Adding onScrollChanged and the ScrollEvent object
651
+* [CB-5422](https://issues.apache.org/jira/browse/CB-5422) Don't require JAVA_HOME to be defined
652
+* [CB-5490](https://issues.apache.org/jira/browse/CB-5490) Add javadoc target to ant script
653
+* [CB-5471](https://issues.apache.org/jira/browse/CB-5471) Deprecated DroidGap class
654
+* [CB-5255](https://issues.apache.org/jira/browse/CB-5255) Prefer Google API targets over android-## targets when building.
655
+* [CB-5232](https://issues.apache.org/jira/browse/CB-5232) Change create script to use Cordova as a Library Project instead of a .jar
656
+* [CB-5302](https://issues.apache.org/jira/browse/CB-5302) Massive movement to get tests working again
657
+* [CB-4996](https://issues.apache.org/jira/browse/CB-4996) Fix paths with spaces while launching on emulator and device
658
+* [CB-5209](https://issues.apache.org/jira/browse/CB-5209) Cannot build Android app if project path contains spaces
659
+
660
+
661
+### 3.2.0 (Nov 2013) ###
662
+
663
+27 commits from 7 authors. Highlights include:
664
+
665
+* [CB-5193](https://issues.apache.org/jira/browse/CB-5193) Fix Android WebSQL sometime throwing SECURITY_ERR.
666
+* [CB-5191](https://issues.apache.org/jira/browse/CB-5191) Deprecate <url-filter>
667
+* Updating shelljs to 0.2.6. Copy now preserves mode bits.
668
+* [CB-4872](https://issues.apache.org/jira/browse/CB-4872) Added android version scripts (android_sdk_version, etc)
669
+* [CB-5117](https://issues.apache.org/jira/browse/CB-5117) Output confirmation message if check_reqs passes.
670
+* [CB-5080](https://issues.apache.org/jira/browse/CB-5080) Find resources in a way that works with aapt's --rename-manifest-package
671
+* [CB-4527](https://issues.apache.org/jira/browse/CB-4527) Don't delete .bat files even when on non-windows platform
672
+* [CB-4892](https://issues.apache.org/jira/browse/CB-4892) Fix create script only escaping the first space instead of all spaces.
673
+
674
+### 3.1.0 (Sept 2013) ###
675
+
676
+55 commits from 9 authors. Highlights include:
677
+
678
+* [CB-4817](https://issues.apache.org/jira/browse/CB-4817) Remove unused assets in project template.
679
+* Fail fast in create script if package name is not com.foo.bar.
680
+* [CB-4782](https://issues.apache.org/jira/browse/CB-4782) Convert ApplicationInfo.java -> appinfo.js
681
+* [CB-4766](https://issues.apache.org/jira/browse/CB-4766) Deprecated JSONUtils.java (moved into plugins)
682
+* [CB-4765](https://issues.apache.org/jira/browse/CB-4765) Deprecated ExifHelper.java (moved into plugins)
683
+* [CB-4764](https://issues.apache.org/jira/browse/CB-4764) Deprecated DirectoryManager.java (moved into plugins)
684
+* [CB-4763](https://issues.apache.org/jira/browse/CB-4763) Deprecated FileHelper.java (moved into plugins), Move getMimeType() into CordovaResourceApi.
685
+* [CB-4725](https://issues.apache.org/jira/browse/CB-4725) Add CordovaWebView.CORDOVA_VERSION constant
686
+* Incrementing version check for Android 4.3 API Level 18
687
+* [CB-3542](https://issues.apache.org/jira/browse/CB-3542) rewrote cli tooling scripts in node
688
+* Allow CordovaChromeClient subclasses access to CordovaInterface and CordovaWebView members
689
+* Refactor CordovaActivity.init so that subclasses can easily override factory methods for webview objects
690
+* [CB-4652](https://issues.apache.org/jira/browse/CB-4652) Allow default project template to be overridden on create
691
+* Tweak the online bridge to not send excess online events.
692
+* [CB-4495](https://issues.apache.org/jira/browse/CB-4495) Modify start-emulator script to exit immediately on a fatal emulator error.
693
+* Log WebView IOExceptions only when they are not 404s
694
+* Use a higher threshold for slow exec() warnings when debugger is attached.
695
+* Fix data URI decoding in CordovaResourceApi
696
+* [CB-3819](https://issues.apache.org/jira/browse/CB-3819) Made it easier to set SplashScreen delay.
697
+* [CB-4013](https://issues.apache.org/jira/browse/CB-4013) Fixed loadUrlTimeoutValue preference.
698
+* Upgrading project to Android 4.3
699
+* [CB-4198](https://issues.apache.org/jira/browse/CB-4198) bin/create script should be better at handling non-word characters in activity name. Patched windows script as well.
700
+* [CB-4198](https://issues.apache.org/jira/browse/CB-4198) bin/create should handle spaces in activity better.
701
+* [CB-4096](https://issues.apache.org/jira/browse/CB-4096) Implemented new unified whitelist for android
702
+* [CB-3384](https://issues.apache.org/jira/browse/CB-3384) Fix thread assertion when plugins remap URIs
703
+

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

@@ -0,0 +1 @@
1
+7.1.1

+ 38
- 0
node_modules/cordova-android/appveyor.yml View File

@@ -0,0 +1,38 @@
1
+image:
2
+  - Previous Visual Studio 2015
3
+
4
+environment:
5
+  ANDROID_HOME: "C:\\android"
6
+  matrix:
7
+  - nodejs_version: "4"
8
+  - nodejs_version: "6"
9
+  - nodejs_version: "8"
10
+
11
+init:
12
+  - mkdir "%ANDROID_HOME%
13
+  - cd "%ANDROID_HOME%"
14
+  - appveyor DownloadFile "https://dl.google.com/android/repository/tools_r25.2.3-windows.zip"
15
+  - 7z x "tools_r25.2.3-windows.zip" > nul
16
+  - cd "C:\projects\cordova-android"
17
+
18
+install:
19
+  - choco install gradle -version 3.4.1
20
+  - gradle -version
21
+  - echo y | "%ANDROID_HOME%\tools\android.bat" --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository
22
+  # on windows we need to accept sublicenses for the new tooling, wee. 30 is an arbitrary number,
23
+  # but should be the maximum number of licenses we explicitly need to type "Y ENTER" for.
24
+  # also, the sdkmanager in all its glory leaks a bit of output to stderr, and powershell
25
+  # and appveyor interpret that as errors, and blows up. so, when piping in our "Y ENTER"
26
+  # responses, we invoke cmd so we can redirect stderr to stdout, and tell it to --update itself.
27
+  - ps: for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | cmd /c 'C:\android\tools\bin\sdkmanager.bat 2>&1' --update
28
+  - ps: Install-Product node $env:nodejs_version
29
+  - npm install
30
+  # below is a workaround on using gradle installed via choco on appveyor
31
+  - set path=C:\ProgramData\chocolatey\lib\gradle\tools\gradle-3.4.1\bin;%path%
32
+
33
+build: off
34
+
35
+test_script:
36
+  - node --version
37
+  - npm --version
38
+  - npm test

+ 29
- 0
node_modules/cordova-android/bin/android_sdk_version View File

@@ -0,0 +1,29 @@
1
+#!/usr/bin/env node
2
+
3
+/*
4
+       Licensed to the Apache Software Foundation (ASF) under one
5
+       or more contributor license agreements.  See the NOTICE file
6
+       distributed with this work for additional information
7
+       regarding copyright ownership.  The ASF licenses this file
8
+       to you under the Apache License, Version 2.0 (the
9
+       "License"); you may not use this file except in compliance
10
+       with the License.  You may obtain a copy of the License at
11
+
12
+         http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+       Unless required by applicable law or agreed to in writing,
15
+       software distributed under the License is distributed on an
16
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+       KIND, either express or implied.  See the License for the
18
+       specific language governing permissions and limitations
19
+       under the License.
20
+*/
21
+
22
+var android_sdk = require('./templates/cordova/lib/android_sdk');
23
+
24
+android_sdk.print_newest_available_sdk_target().done(null, function(err) {
25
+    console.error(err);
26
+    process.exit(2);
27
+});
28
+
29
+

+ 26
- 0
node_modules/cordova-android/bin/android_sdk_version.bat View File

@@ -0,0 +1,26 @@
1
+:: Licensed to the Apache Software Foundation (ASF) under one
2
+:: or more contributor license agreements.  See the NOTICE file
3
+:: distributed with this work for additional information
4
+:: regarding copyright ownership.  The ASF licenses this file
5
+:: to you under the Apache License, Version 2.0 (the
6
+:: "License"); you may not use this file except in compliance
7
+:: with the License.  You may obtain a copy of the License at
8
+:: 
9
+:: http://www.apache.org/licenses/LICENSE-2.0
10
+:: 
11
+:: Unless required by applicable law or agreed to in writing,
12
+:: software distributed under the License is distributed on an
13
+:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+:: KIND, either express or implied.  See the License for the
15
+:: specific language governing permissions and limitations
16
+:: under the License.
17
+
18
+@ECHO OFF
19
+SET script_path="%~dp0android_sdk_version"
20
+IF EXIST %script_path% (
21
+        node %script_path% %*
22
+) ELSE (
23
+    ECHO.
24
+    ECHO ERROR: Could not find 'android_sdk_version' script in 'bin' folder, aborting...>&2
25
+    EXIT /B 1
26
+)

+ 31
- 0
node_modules/cordova-android/bin/check_reqs View File

@@ -0,0 +1,31 @@
1
+#!/usr/bin/env node
2
+
3
+/*
4
+       Licensed to the Apache Software Foundation (ASF) under one
5
+       or more contributor license agreements.  See the NOTICE file
6
+       distributed with this work for additional information
7
+       regarding copyright ownership.  The ASF licenses this file
8
+       to you under the Apache License, Version 2.0 (the
9
+       "License"); you may not use this file except in compliance
10
+       with the License.  You may obtain a copy of the License at
11
+
12
+         http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+       Unless required by applicable law or agreed to in writing,
15
+       software distributed under the License is distributed on an
16
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+       KIND, either express or implied.  See the License for the
18
+       specific language governing permissions and limitations
19
+       under the License.
20
+*/
21
+
22
+var check_reqs = require('./templates/cordova/lib/check_reqs');
23
+
24
+check_reqs.run().done(
25
+    function success() {
26
+        console.log('Looks like your environment fully supports cordova-android development!');
27
+    }, function fail(err) {
28
+        console.log(err);
29
+        process.exit(2);
30
+    }
31
+);

+ 26
- 0
node_modules/cordova-android/bin/check_reqs.bat View File

@@ -0,0 +1,26 @@
1
+:: Licensed to the Apache Software Foundation (ASF) under one
2
+:: or more contributor license agreements.  See the NOTICE file
3
+:: distributed with this work for additional information
4
+:: regarding copyright ownership.  The ASF licenses this file
5
+:: to you under the Apache License, Version 2.0 (the
6
+:: "License"); you may not use this file except in compliance
7
+:: with the License.  You may obtain a copy of the License at
8
+:: 
9
+:: http://www.apache.org/licenses/LICENSE-2.0
10
+:: 
11
+:: Unless required by applicable law or agreed to in writing,
12
+:: software distributed under the License is distributed on an
13
+:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+:: KIND, either express or implied.  See the License for the
15
+:: specific language governing permissions and limitations
16
+:: under the License.
17
+
18
+@ECHO OFF
19
+SET script_path="%~dp0check_reqs"
20
+IF EXIST %script_path% (
21
+        node %script_path% %*
22
+) ELSE (
23
+    ECHO.
24
+    ECHO ERROR: Could not find 'check_reqs' script in 'bin' folder, aborting...>&2
25
+    EXIT /B 1
26
+)

+ 58
- 0
node_modules/cordova-android/bin/create View File

@@ -0,0 +1,58 @@
1
+#!/usr/bin/env node
2
+
3
+/*
4
+       Licensed to the Apache Software Foundation (ASF) under one
5
+       or more contributor license agreements.  See the NOTICE file
6
+       distributed with this work for additional information
7
+       regarding copyright ownership.  The ASF licenses this file
8
+       to you under the Apache License, Version 2.0 (the
9
+       "License"); you may not use this file except in compliance
10
+       with the License.  You may obtain a copy of the License at
11
+
12
+         http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+       Unless required by applicable law or agreed to in writing,
15
+       software distributed under the License is distributed on an
16
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+       KIND, either express or implied.  See the License for the
18
+       specific language governing permissions and limitations
19
+       under the License.
20
+*/
21
+var path = require('path');
22
+var ConfigParser = require('cordova-common').ConfigParser;
23
+var Api = require('./templates/cordova/Api');
24
+
25
+var argv = require('nopt')({
26
+    'help' : Boolean,
27
+    'cli' : Boolean,
28
+    'shared' : Boolean,
29
+    'link' : Boolean,
30
+    'activity-name' : [String, undefined]
31
+}, { 'd' : '--verbose' });
32
+
33
+if (argv.help || argv.argv.remain.length === 0) {
34
+    console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'create')) + ' <path_to_new_project> <package_name> <project_name> [<template_path>] [--activity-name <activity_name>] [--link]');
35
+    console.log('    <path_to_new_project>: Path to your new Cordova Android project');
36
+    console.log('    <package_name>: Package name, following reverse-domain style convention');
37
+    console.log('    <project_name>: Project name');
38
+    console.log('    <template_path>: Path to a custom application template to use');
39
+    console.log('    --activity-name <activity_name>: Activity name');
40
+    console.log('    --link will use the CordovaLib project directly instead of making a copy.');
41
+    process.exit(1);
42
+}
43
+
44
+var config = new ConfigParser(path.resolve(__dirname, 'templates/project/res/xml/config.xml'));
45
+
46
+if (argv.argv.remain[1]) config.setPackageName(argv.argv.remain[1]);
47
+if (argv.argv.remain[2]) config.setName(argv.argv.remain[2]);
48
+if (argv['activity-name']) config.setName(argv['activity-name']);
49
+
50
+var options = {
51
+    link: argv.link || argv.shared,
52
+    customTemplate: argv.argv.remain[3],
53
+    activityName: argv['activity-name']
54
+};
55
+
56
+require('./templates/cordova/loggingHelper').adjustLoggerLevel(argv);
57
+
58
+Api.createPlatform(argv.argv.remain[0], config, options).done();

+ 26
- 0
node_modules/cordova-android/bin/create.bat View File

@@ -0,0 +1,26 @@
1
+:: Licensed to the Apache Software Foundation (ASF) under one
2
+:: or more contributor license agreements.  See the NOTICE file
3
+:: distributed with this work for additional information
4
+:: regarding copyright ownership.  The ASF licenses this file
5
+:: to you under the Apache License, Version 2.0 (the
6
+:: "License"); you may not use this file except in compliance
7
+:: with the License.  You may obtain a copy of the License at
8
+:: 
9
+:: http://www.apache.org/licenses/LICENSE-2.0
10
+:: 
11
+:: Unless required by applicable law or agreed to in writing,
12
+:: software distributed under the License is distributed on an
13
+:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+:: KIND, either express or implied.  See the License for the
15
+:: specific language governing permissions and limitations
16
+:: under the License.
17
+
18
+@ECHO OFF
19
+SET script_path="%~dp0create"
20
+IF EXIST %script_path% (
21
+    node %script_path% %*
22
+) ELSE (
23
+    ECHO.
24
+    ECHO ERROR: Could not find 'create' script in 'bin' folder, aborting...>&2
25
+    EXIT /B 1
26
+)

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

@@ -0,0 +1,360 @@
1
+#!/usr/bin/env node
2
+
3
+/*
4
+       Licensed to the Apache Software Foundation (ASF) under one
5
+       or more contributor license agreements.  See the NOTICE file
6
+       distributed with this work for additional information
7
+       regarding copyright ownership.  The ASF licenses this file
8
+       to you under the Apache License, Version 2.0 (the
9
+       "License"); you may not use this file except in compliance
10
+       with the License.  You may obtain a copy of the License at
11
+
12
+         http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+       Unless required by applicable law or agreed to in writing,
15
+       software distributed under the License is distributed on an
16
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+       KIND, either express or implied.  See the License for the
18
+       specific language governing permissions and limitations
19
+       under the License.
20
+*/
21
+
22
+var shell = require('shelljs');
23
+var Q = require('q');
24
+var path = require('path');
25
+var fs = require('fs');
26
+var check_reqs = require('./../templates/cordova/lib/check_reqs');
27
+var ROOT = path.join(__dirname, '..', '..');
28
+
29
+var CordovaError = require('cordova-common').CordovaError;
30
+var AndroidManifest = require('../templates/cordova/lib/AndroidManifest');
31
+
32
+// Export all helper functions, and make sure internally within this module, we
33
+// reference these methods via the `exports` object - this helps with testing
34
+// (since we can then mock and control behaviour of all of these functions)
35
+exports.validatePackageName = validatePackageName;
36
+exports.validateProjectName = validateProjectName;
37
+exports.setShellFatal = setShellFatal;
38
+exports.copyJsAndLibrary = copyJsAndLibrary;
39
+exports.copyScripts = copyScripts;
40
+exports.copyBuildRules = copyBuildRules;
41
+exports.writeProjectProperties = writeProjectProperties;
42
+exports.prepBuildFiles = prepBuildFiles;
43
+
44
+function setShellFatal (value, func) {
45
+    var oldVal = shell.config.fatal;
46
+    shell.config.fatal = value;
47
+    func();
48
+    shell.config.fatal = oldVal;
49
+}
50
+
51
+function getFrameworkDir (projectPath, shared) {
52
+    return shared ? path.join(ROOT, 'framework') : path.join(projectPath, 'CordovaLib');
53
+}
54
+
55
+function copyJsAndLibrary (projectPath, shared, projectName, isLegacy) {
56
+    var nestedCordovaLibPath = getFrameworkDir(projectPath, false);
57
+    var srcCordovaJsPath = path.join(ROOT, 'bin', 'templates', 'project', 'assets', 'www', 'cordova.js');
58
+    var app_path = path.join(projectPath, 'app', 'src', 'main');
59
+
60
+    if (isLegacy) {
61
+        app_path = projectPath;
62
+    }
63
+
64
+    shell.cp('-f', srcCordovaJsPath, path.join(app_path, 'assets', 'www', 'cordova.js'));
65
+
66
+    // Copy the cordova.js file to platforms/<platform>/platform_www/
67
+    // The www dir is nuked on each prepare so we keep cordova.js in platform_www
68
+    shell.mkdir('-p', path.join(projectPath, 'platform_www'));
69
+    shell.cp('-f', srcCordovaJsPath, path.join(projectPath, 'platform_www'));
70
+
71
+    // Copy cordova-js-src directory into platform_www directory.
72
+    // We need these files to build cordova.js if using browserify method.
73
+    shell.cp('-rf', path.join(ROOT, 'cordova-js-src'), path.join(projectPath, 'platform_www'));
74
+
75
+    // Don't fail if there are no old jars.
76
+    exports.setShellFatal(false, function () {
77
+        shell.ls(path.join(app_path, 'libs', 'cordova-*.jar')).forEach(function (oldJar) {
78
+            console.log('Deleting ' + oldJar);
79
+            shell.rm('-f', oldJar);
80
+        });
81
+        var wasSymlink = true;
82
+        try {
83
+            // Delete the symlink if it was one.
84
+            fs.unlinkSync(nestedCordovaLibPath);
85
+        } catch (e) {
86
+            wasSymlink = false;
87
+        }
88
+        // Delete old library project if it existed.
89
+        if (shared) {
90
+            shell.rm('-rf', nestedCordovaLibPath);
91
+        } else if (!wasSymlink) {
92
+            // Delete only the src, since Eclipse / Android Studio can't handle their project files being deleted.
93
+            shell.rm('-rf', path.join(nestedCordovaLibPath, 'src'));
94
+        }
95
+    });
96
+    if (shared) {
97
+        var relativeFrameworkPath = path.relative(projectPath, getFrameworkDir(projectPath, true));
98
+        fs.symlinkSync(relativeFrameworkPath, nestedCordovaLibPath, 'dir');
99
+    } else {
100
+        shell.mkdir('-p', nestedCordovaLibPath);
101
+        shell.cp('-f', path.join(ROOT, 'framework', 'AndroidManifest.xml'), nestedCordovaLibPath);
102
+        shell.cp('-f', path.join(ROOT, 'framework', 'project.properties'), nestedCordovaLibPath);
103
+        shell.cp('-f', path.join(ROOT, 'framework', 'build.gradle'), nestedCordovaLibPath);
104
+        shell.cp('-f', path.join(ROOT, 'framework', 'cordova.gradle'), nestedCordovaLibPath);
105
+        shell.cp('-r', path.join(ROOT, 'framework', 'src'), nestedCordovaLibPath);
106
+    }
107
+}
108
+
109
+function extractSubProjectPaths (data) {
110
+    var ret = {};
111
+    var r = /^\s*android\.library\.reference\.\d+=(.*)(?:\s|$)/mg;
112
+    var m;
113
+    while ((m = r.exec(data))) {
114
+        ret[m[1]] = 1;
115
+    }
116
+    return Object.keys(ret);
117
+}
118
+
119
+function writeProjectProperties (projectPath, target_api) {
120
+    var dstPath = path.join(projectPath, 'project.properties');
121
+    var templatePath = path.join(ROOT, 'bin', 'templates', 'project', 'project.properties');
122
+    var srcPath = fs.existsSync(dstPath) ? dstPath : templatePath;
123
+
124
+    var data = fs.readFileSync(srcPath, 'utf8');
125
+    data = data.replace(/^target=.*/m, 'target=' + target_api);
126
+    var subProjects = extractSubProjectPaths(data);
127
+    subProjects = subProjects.filter(function (p) {
128
+        return !(/^CordovaLib$/m.exec(p) ||
129
+                 /[\\/]cordova-android[\\/]framework$/m.exec(p) ||
130
+                 /^(\.\.[\\/])+framework$/m.exec(p));
131
+    });
132
+    subProjects.unshift('CordovaLib');
133
+    data = data.replace(/^\s*android\.library\.reference\.\d+=.*\n/mg, '');
134
+    if (!/\n$/.exec(data)) {
135
+        data += '\n';
136
+    }
137
+    for (var i = 0; i < subProjects.length; ++i) {
138
+        data += 'android.library.reference.' + (i + 1) + '=' + subProjects[i] + '\n';
139
+    }
140
+    fs.writeFileSync(dstPath, data);
141
+}
142
+
143
+// This makes no sense, what if you're building with a different build system?
144
+function prepBuildFiles (projectPath, builder) {
145
+    var buildModule = require(path.resolve(projectPath, 'cordova/lib/builders/builders'));
146
+    buildModule.getBuilder(builder).prepBuildFiles();
147
+}
148
+
149
+function copyBuildRules (projectPath, isLegacy) {
150
+    var srcDir = path.join(ROOT, 'bin', 'templates', 'project');
151
+
152
+    if (isLegacy) {
153
+        // The project's build.gradle is identical to the earlier build.gradle, so it should still work
154
+        shell.cp('-f', path.join(srcDir, 'legacy', 'build.gradle'), projectPath);
155
+        shell.cp('-f', path.join(srcDir, 'wrapper.gradle'), projectPath);
156
+    } else {
157
+        shell.cp('-f', path.join(srcDir, 'build.gradle'), projectPath);
158
+        shell.cp('-f', path.join(srcDir, 'app', 'build.gradle'), path.join(projectPath, 'app'));
159
+        shell.cp('-f', path.join(srcDir, 'wrapper.gradle'), projectPath);
160
+    }
161
+}
162
+
163
+function copyScripts (projectPath) {
164
+    var bin = path.join(ROOT, 'bin');
165
+    var srcScriptsDir = path.join(bin, 'templates', 'cordova');
166
+    var destScriptsDir = path.join(projectPath, 'cordova');
167
+    // Delete old scripts directory if this is an update.
168
+    shell.rm('-rf', destScriptsDir);
169
+    // Copy in the new ones.
170
+    shell.cp('-r', srcScriptsDir, projectPath);
171
+    shell.cp('-r', path.join(ROOT, 'node_modules'), destScriptsDir);
172
+    shell.cp(path.join(bin, 'check_reqs*'), destScriptsDir);
173
+    shell.cp(path.join(bin, 'android_sdk_version*'), destScriptsDir);
174
+    var check_reqs = path.join(destScriptsDir, 'check_reqs');
175
+    var android_sdk_version = path.join(destScriptsDir, 'android_sdk_version');
176
+    // TODO: the two files being edited on-the-fly here are shared between
177
+    // platform and project-level commands. the below `sed` is updating the
178
+    // `require` path for the two libraries. if there's a better way to share
179
+    // modules across both the repo and generated projects, we should make sure
180
+    // to remove/update this.
181
+    shell.sed('-i', /templates\/cordova\//, '', android_sdk_version);
182
+    shell.sed('-i', /templates\/cordova\//, '', check_reqs);
183
+}
184
+
185
+/**
186
+ * Test whether a package name is acceptable for use as an android project.
187
+ * Returns a promise, fulfilled if the package name is acceptable; rejected
188
+ * otherwise.
189
+ */
190
+function validatePackageName (package_name) {
191
+    // Make the package conform to Java package types
192
+    // http://developer.android.com/guide/topics/manifest/manifest-element.html#package
193
+    // Enforce underscore limitation
194
+    var msg = 'Error validating package name. ';
195
+
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'));
198
+    }
199
+
200
+    // Class is a reserved word
201
+    if (/\b[Cc]lass\b/.test(package_name)) {
202
+        return Q.reject(new CordovaError(msg + '"class" is a reserved word'));
203
+    }
204
+
205
+    return Q.resolve();
206
+}
207
+
208
+/**
209
+ * Test whether a project name is acceptable for use as an android class.
210
+ * Returns a promise, fulfilled if the project name is acceptable; rejected
211
+ * otherwise.
212
+ */
213
+function validateProjectName (project_name) {
214
+    var msg = 'Error validating project name. ';
215
+    // Make sure there's something there
216
+    if (project_name === '') {
217
+        return Q.reject(new CordovaError(msg + 'Project name cannot be empty'));
218
+    }
219
+
220
+    // Enforce stupid name error
221
+    if (project_name === 'CordovaActivity') {
222
+        return Q.reject(new CordovaError(msg + 'Project name cannot be CordovaActivity'));
223
+    }
224
+
225
+    // Classes in Java don't begin with numbers
226
+    if (/^[0-9]/.test(project_name)) {
227
+        return Q.reject(new CordovaError(msg + 'Project name must not begin with a number'));
228
+    }
229
+
230
+    return Q.resolve();
231
+}
232
+
233
+/**
234
+ * Creates an android application with the given options.
235
+ *
236
+ * @param   {String}  project_path  Path to the new Cordova android project.
237
+ * @param   {ConfigParser}  config  Instance of ConfigParser to retrieve basic
238
+ *   project properties.
239
+ * @param   {Object}  [options={}]  Various options
240
+ * @param   {String}  [options.activityName='MainActivity']  Name for the
241
+ *   activity
242
+ * @param   {Boolean}  [options.link=false]  Specifies whether javascript files
243
+ *   and CordovaLib framework will be symlinked to created application.
244
+ * @param   {String}  [options.customTemplate]  Path to project template
245
+ *   (override)
246
+ * @param   {EventEmitter}  [events]  An EventEmitter instance for logging
247
+ *   events
248
+ *
249
+ * @return  {Promise<String>}  Directory where application has been created
250
+ */
251
+exports.create = function (project_path, config, options, events) {
252
+
253
+    options = options || {};
254
+
255
+    // Set default values for path, package and name
256
+    project_path = path.relative(process.cwd(), (project_path || 'CordovaExample'));
257
+    // Check if project already exists
258
+    if (fs.existsSync(project_path)) {
259
+        return Q.reject(new CordovaError('Project already exists! Delete and recreate'));
260
+    }
261
+
262
+    var package_name = config.android_packageName() || config.packageName() || 'my.cordova.project';
263
+    var project_name = config.name() ?
264
+        config.name().replace(/[^\w.]/g, '_') : 'CordovaExample';
265
+
266
+    var safe_activity_name = config.android_activityName() || options.activityName || 'MainActivity';
267
+    var target_api = check_reqs.get_target();
268
+
269
+    // Make the package conform to Java package types
270
+    return exports.validatePackageName(package_name)
271
+        .then(function () {
272
+            exports.validateProjectName(project_name);
273
+        }).then(function () {
274
+        // Log the given values for the project
275
+            events.emit('log', 'Creating Cordova project for the Android platform:');
276
+            events.emit('log', '\tPath: ' + project_path);
277
+            events.emit('log', '\tPackage: ' + package_name);
278
+            events.emit('log', '\tName: ' + project_name);
279
+            events.emit('log', '\tActivity: ' + safe_activity_name);
280
+            events.emit('log', '\tAndroid target: ' + target_api);
281
+
282
+            events.emit('verbose', 'Copying android template project to ' + project_path);
283
+
284
+            exports.setShellFatal(true, function () {
285
+                var project_template_dir = options.customTemplate || path.join(ROOT, 'bin', 'templates', 'project');
286
+                var app_path = path.join(project_path, 'app', 'src', 'main');
287
+
288
+                // copy project template
289
+                shell.mkdir('-p', app_path);
290
+                shell.cp('-r', path.join(project_template_dir, 'assets'), app_path);
291
+                shell.cp('-r', path.join(project_template_dir, 'res'), app_path);
292
+                shell.cp(path.join(project_template_dir, 'gitignore'), path.join(project_path, '.gitignore'));
293
+
294
+                // Manually create directories that would be empty within the template (since git doesn't track directories).
295
+                shell.mkdir(path.join(app_path, 'libs'));
296
+
297
+                // copy cordova.js, cordova.jar
298
+                exports.copyJsAndLibrary(project_path, options.link, safe_activity_name);
299
+
300
+                // Set up ther Android Studio paths
301
+                var java_path = path.join(app_path, 'java');
302
+                var assets_path = path.join(app_path, 'assets');
303
+                var resource_path = path.join(app_path, 'res');
304
+                shell.mkdir('-p', java_path);
305
+                shell.mkdir('-p', assets_path);
306
+                shell.mkdir('-p', resource_path);
307
+
308
+                // interpolate the activity name and package
309
+                var packagePath = package_name.replace(/\./g, path.sep);
310
+                var activity_dir = path.join(java_path, packagePath);
311
+                var activity_path = path.join(activity_dir, safe_activity_name + '.java');
312
+
313
+                shell.mkdir('-p', activity_dir);
314
+                shell.cp('-f', path.join(project_template_dir, 'Activity.java'), activity_path);
315
+                shell.sed('-i', /__ACTIVITY__/, safe_activity_name, activity_path);
316
+                shell.sed('-i', /__NAME__/, project_name, path.join(app_path, 'res', 'values', 'strings.xml'));
317
+                shell.sed('-i', /__ID__/, package_name, activity_path);
318
+
319
+                var manifest = new AndroidManifest(path.join(project_template_dir, 'AndroidManifest.xml'));
320
+                manifest.setPackageId(package_name)
321
+                    .setTargetSdkVersion(target_api.split('-')[1])
322
+                    .getActivity().setName(safe_activity_name);
323
+
324
+                var manifest_path = path.join(app_path, 'AndroidManifest.xml');
325
+                manifest.write(manifest_path);
326
+
327
+                exports.copyScripts(project_path);
328
+                exports.copyBuildRules(project_path);
329
+            });
330
+            // Link it to local android install.
331
+            exports.writeProjectProperties(project_path, target_api);
332
+            exports.prepBuildFiles(project_path, 'studio');
333
+            events.emit('log', generateDoneMessage('create', options.link));
334
+        }).thenResolve(project_path);
335
+};
336
+
337
+function generateDoneMessage (type, link) {
338
+    var pkg = require('../../package');
339
+    var msg = 'Android project ' + (type === 'update' ? 'updated ' : 'created ') + 'with ' + pkg.name + '@' + pkg.version;
340
+    if (link) {
341
+        msg += ' and has a linked CordovaLib';
342
+    }
343
+    return msg;
344
+}
345
+
346
+// Returns a promise.
347
+exports.update = function (projectPath, options, events) {
348
+
349
+    var errorString =
350
+        'An in-place platform update is not supported. \n' +
351
+        'The `platforms` folder is always treated as a build artifact in the CLI workflow.\n' +
352
+        'To update your platform, you have to remove, then add your android platform again.\n' +
353
+        'Make sure you save your plugins beforehand using `cordova plugin save`, and save \n' + 'a copy of the platform first if you had manual changes in it.\n' +
354
+        '\tcordova plugin save\n' +
355
+        '\tcordova platform rm android\n' +
356
+        '\tcordova platform add android\n'
357
+        ;
358
+
359
+    return Q.reject(errorString);
360
+};

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

@@ -0,0 +1,411 @@
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 Q = require('q');
22
+
23
+var AndroidProject = require('./lib/AndroidProject');
24
+var AndroidStudio = require('./lib/AndroidStudio');
25
+var PluginManager = require('cordova-common').PluginManager;
26
+
27
+var CordovaLogger = require('cordova-common').CordovaLogger;
28
+var selfEvents = require('cordova-common').events;
29
+
30
+var PLATFORM = 'android';
31
+
32
+function setupEvents (externalEventEmitter) {
33
+    if (externalEventEmitter) {
34
+        // This will make the platform internal events visible outside
35
+        selfEvents.forwardEventsTo(externalEventEmitter);
36
+        return externalEventEmitter;
37
+    }
38
+
39
+    // There is no logger if external emitter is not present,
40
+    // so attach a console logger
41
+    CordovaLogger.get().subscribe(selfEvents);
42
+    return selfEvents;
43
+}
44
+
45
+/**
46
+ * Class, that acts as abstraction over particular platform. Encapsulates the
47
+ *   platform's properties and methods.
48
+ *
49
+ * Platform that implements own PlatformApi instance _should implement all
50
+ *   prototype methods_ of this class to be fully compatible with cordova-lib.
51
+ *
52
+ * The PlatformApi instance also should define the following field:
53
+ *
54
+ * * platform: String that defines a platform name.
55
+ */
56
+function Api (platform, platformRootDir, events) {
57
+    this.platform = PLATFORM;
58
+    this.root = path.resolve(__dirname, '..');
59
+    this.builder = 'gradle';
60
+
61
+    setupEvents(events);
62
+
63
+    var self = this;
64
+
65
+    this.locations = {
66
+        root: self.root,
67
+        www: path.join(self.root, 'assets/www'),
68
+        res: path.join(self.root, 'res'),
69
+        platformWww: path.join(self.root, 'platform_www'),
70
+        configXml: path.join(self.root, 'res/xml/config.xml'),
71
+        defaultConfigXml: path.join(self.root, 'cordova/defaults.xml'),
72
+        strings: path.join(self.root, 'res/values/strings.xml'),
73
+        manifest: path.join(self.root, 'AndroidManifest.xml'),
74
+        build: path.join(self.root, 'build'),
75
+        javaSrc: path.join(self.root, 'src'),
76
+        // NOTE: Due to platformApi spec we need to return relative paths here
77
+        cordovaJs: 'bin/templates/project/assets/www/cordova.js',
78
+        cordovaJsSrc: 'cordova-js-src'
79
+    };
80
+
81
+    // XXX Override some locations for Android Studio projects
82
+    if (AndroidStudio.isAndroidStudioProject(self.root) === true) {
83
+        selfEvents.emit('log', 'Android Studio project detected');
84
+        this.builder = 'studio';
85
+        this.android_studio = true;
86
+        this.locations.configXml = path.join(self.root, 'app/src/main/res/xml/config.xml');
87
+        this.locations.strings = path.join(self.root, 'app/src/main/res/values/strings.xml');
88
+        this.locations.manifest = path.join(self.root, 'app/src/main/AndroidManifest.xml');
89
+        // We could have Java Source, we could have other languages
90
+        this.locations.javaSrc = path.join(self.root, 'app/src/main/java/');
91
+        this.locations.www = path.join(self.root, 'app/src/main/assets/www');
92
+        this.locations.res = path.join(self.root, 'app/src/main/res');
93
+    }
94
+}
95
+
96
+/**
97
+ * Installs platform to specified directory and creates a platform project.
98
+ *
99
+ * @param  {String}  destination Destination directory, where insatll platform to
100
+ * @param  {ConfigParser}  [config] ConfgiParser instance, used to retrieve
101
+ *   project creation options, such as package id and project name.
102
+ * @param  {Object}  [options]  An options object. The most common options are:
103
+ * @param  {String}  [options.customTemplate]  A path to custom template, that
104
+ *   should override the default one from platform.
105
+ * @param  {Boolean}  [options.link]  Flag that indicates that platform's
106
+ *   sources will be linked to installed platform instead of copying.
107
+ * @param {EventEmitter} [events] An EventEmitter instance that will be used for
108
+ *   logging purposes. If no EventEmitter provided, all events will be logged to
109
+ *   console
110
+ *
111
+ * @return {Promise<PlatformApi>} Promise either fulfilled with PlatformApi
112
+ *   instance or rejected with CordovaError.
113
+ */
114
+Api.createPlatform = function (destination, config, options, events) {
115
+    events = setupEvents(events);
116
+    var result;
117
+    try {
118
+        result = require('../../lib/create').create(destination, config, options, events).then(function (destination) {
119
+            var PlatformApi = require(path.resolve(destination, 'cordova/Api'));
120
+            return new PlatformApi(PLATFORM, destination, events);
121
+        });
122
+    } catch (e) {
123
+        events.emit('error', 'createPlatform is not callable from the android project API.');
124
+        throw (e);
125
+    }
126
+    return result;
127
+};
128
+
129
+/**
130
+ * Updates already installed platform.
131
+ *
132
+ * @param  {String}  destination Destination directory, where platform installed
133
+ * @param  {Object}  [options]  An options object. The most common options are:
134
+ * @param  {String}  [options.customTemplate]  A path to custom template, that
135
+ *   should override the default one from platform.
136
+ * @param  {Boolean}  [options.link]  Flag that indicates that platform's
137
+ *   sources will be linked to installed platform instead of copying.
138
+ * @param {EventEmitter} [events] An EventEmitter instance that will be used for
139
+ *   logging purposes. If no EventEmitter provided, all events will be logged to
140
+ *   console
141
+ *
142
+ * @return {Promise<PlatformApi>} Promise either fulfilled with PlatformApi
143
+ *   instance or rejected with CordovaError.
144
+ */
145
+Api.updatePlatform = function (destination, options, events) {
146
+    events = setupEvents(events);
147
+    var result;
148
+    try {
149
+        result = require('../../lib/create').update(destination, options, events).then(function (destination) {
150
+            var PlatformApi = require(path.resolve(destination, 'cordova/Api'));
151
+            return new PlatformApi('android', destination, events);
152
+        });
153
+    } catch (e) {
154
+        events.emit('error', 'updatePlatform is not callable from the android project API, you will need to do this manually.');
155
+        throw (e);
156
+    }
157
+    return result;
158
+};
159
+
160
+/**
161
+ * Gets a CordovaPlatform object, that represents the platform structure.
162
+ *
163
+ * @return  {CordovaPlatform}  A structure that contains the description of
164
+ *   platform's file structure and other properties of platform.
165
+ */
166
+Api.prototype.getPlatformInfo = function () {
167
+    var result = {};
168
+    result.locations = this.locations;
169
+    result.root = this.root;
170
+    result.name = this.platform;
171
+    result.version = require('./version');
172
+    result.projectConfig = this._config;
173
+
174
+    return result;
175
+};
176
+
177
+/**
178
+ * Updates installed platform with provided www assets and new app
179
+ *   configuration. This method is required for CLI workflow and will be called
180
+ *   each time before build, so the changes, made to app configuration and www
181
+ *   code, will be applied to platform.
182
+ *
183
+ * @param {CordovaProject} cordovaProject A CordovaProject instance, that defines a
184
+ *   project structure and configuration, that should be applied to platform
185
+ *   (contains project's www location and ConfigParser instance for project's
186
+ *   config).
187
+ *
188
+ * @return  {Promise}  Return a promise either fulfilled, or rejected with
189
+ *   CordovaError instance.
190
+ */
191
+Api.prototype.prepare = function (cordovaProject, prepareOptions) {
192
+    return require('./lib/prepare').prepare.call(this, cordovaProject, prepareOptions);
193
+};
194
+
195
+/**
196
+ * Installs a new plugin into platform. This method only copies non-www files
197
+ *   (sources, libs, etc.) to platform. It also doesn't resolves the
198
+ *   dependencies of plugin. Both of handling of www files, such as assets and
199
+ *   js-files and resolving dependencies are the responsibility of caller.
200
+ *
201
+ * @param  {PluginInfo}  plugin  A PluginInfo instance that represents plugin
202
+ *   that will be installed.
203
+ * @param  {Object}  installOptions  An options object. Possible options below:
204
+ * @param  {Boolean}  installOptions.link: Flag that specifies that plugin
205
+ *   sources will be symlinked to app's directory instead of copying (if
206
+ *   possible).
207
+ * @param  {Object}  installOptions.variables  An object that represents
208
+ *   variables that will be used to install plugin. See more details on plugin
209
+ *   variables in documentation:
210
+ *   https://cordova.apache.org/docs/en/4.0.0/plugin_ref_spec.md.html
211
+ *
212
+ * @return  {Promise}  Return a promise either fulfilled, or rejected with
213
+ *   CordovaError instance.
214
+ */
215
+Api.prototype.addPlugin = function (plugin, installOptions) {
216
+    var project = AndroidProject.getProjectFile(this.root);
217
+    var self = this;
218
+
219
+    installOptions = installOptions || {};
220
+    installOptions.variables = installOptions.variables || {};
221
+    // Add PACKAGE_NAME variable into vars
222
+    if (!installOptions.variables.PACKAGE_NAME) {
223
+        installOptions.variables.PACKAGE_NAME = project.getPackageName();
224
+    }
225
+
226
+    if (this.android_studio === true) {
227
+        installOptions.android_studio = true;
228
+    }
229
+
230
+    return Q().then(function () {
231
+        // CB-11964: Do a clean when installing the plugin code to get around
232
+        // the Gradle bug introduced by the Android Gradle Plugin Version 2.2
233
+        // TODO: Delete when the next version of Android Gradle plugin comes out
234
+        // Since clean doesn't just clean the build, it also wipes out www, we need
235
+        // to pass additional options.
236
+
237
+        // Do some basic argument parsing
238
+        var opts = {};
239
+
240
+        // Skip cleaning prepared files when not invoking via cordova CLI.
241
+        opts.noPrepare = true;
242
+
243
+        if (!AndroidStudio.isAndroidStudioProject(self.root) && !project.isClean()) {
244
+            return self.clean(opts);
245
+        }
246
+    }).then(function () {
247
+        return PluginManager.get(self.platform, self.locations, project).addPlugin(plugin, installOptions);
248
+    }).then(function () {
249
+        if (plugin.getFrameworks(this.platform).length === 0) return;
250
+        selfEvents.emit('verbose', 'Updating build files since android plugin contained <framework>');
251
+          // This should pick the correct builder, not just get gradle
252
+        require('./lib/builders/builders').getBuilder(this.builder).prepBuildFiles();
253
+    }.bind(this))
254
+        // CB-11022 Return truthy value to prevent running prepare after
255
+        .thenResolve(true);
256
+};
257
+
258
+/**
259
+ * Removes an installed plugin from platform.
260
+ *
261
+ * Since method accepts PluginInfo instance as input parameter instead of plugin
262
+ *   id, caller shoud take care of managing/storing PluginInfo instances for
263
+ *   future uninstalls.
264
+ *
265
+ * @param  {PluginInfo}  plugin  A PluginInfo instance that represents plugin
266
+ *   that will be installed.
267
+ *
268
+ * @return  {Promise}  Return a promise either fulfilled, or rejected with
269
+ *   CordovaError instance.
270
+ */
271
+Api.prototype.removePlugin = function (plugin, uninstallOptions) {
272
+    var project = AndroidProject.getProjectFile(this.root);
273
+
274
+    if (uninstallOptions && uninstallOptions.usePlatformWww === true && this.android_studio === true) {
275
+        uninstallOptions.usePlatformWww = false;
276
+        uninstallOptions.android_studio = true;
277
+    }
278
+
279
+    return PluginManager.get(this.platform, this.locations, project)
280
+        .removePlugin(plugin, uninstallOptions)
281
+        .then(function () {
282
+            if (plugin.getFrameworks(this.platform).length === 0) return;
283
+
284
+            selfEvents.emit('verbose', 'Updating build files since android plugin contained <framework>');
285
+            require('./lib/builders/builders').getBuilder(this.builder).prepBuildFiles();
286
+        }.bind(this))
287
+        // CB-11022 Return truthy value to prevent running prepare after
288
+        .thenResolve(true);
289
+};
290
+
291
+/**
292
+ * Builds an application package for current platform.
293
+ *
294
+ * @param  {Object}  buildOptions  A build options. This object's structure is
295
+ *   highly depends on platform's specific. The most common options are:
296
+ * @param  {Boolean}  buildOptions.debug  Indicates that packages should be
297
+ *   built with debug configuration. This is set to true by default unless the
298
+ *   'release' option is not specified.
299
+ * @param  {Boolean}  buildOptions.release  Indicates that packages should be
300
+ *   built with release configuration. If not set to true, debug configuration
301
+ *   will be used.
302