* feat!: upgrade gradle to 6.1
* feat!: upgrade gradle build tools to 3.5.3
* feat: added `npm run clean-tests`
* fix!: Removed useDeprecatedNdk as this option is now completely removed from gradle.
* feat!: bump gradle to 6.1 & gradle build tools to 3.5.3
Co-authored-by: エリス <erisu@users.noreply.github.com>
* feat: Add support for GoogleServicesEnabled preference option
* fix: wrap google-services classpath with GoogleServicesEnabled flag
* chore: bump google-services version to 4.2.0
* feat: Add support for GoogleServicesVersion preference option
Co-authored-by: Maksim Chemerisuk <chemerisuk@users.noreply.github.com>
* (android) increased default target sdk to 29
* Updated travis and appveyor to use build tools/api level 29
* Fixed two other files that was missing the API 29 update
* removed unnecessary restriction that prevented project names from starting with a number. Project names starting with a number is perfectly valid.
* Reworded validateProjectName jsdoc
Co-Authored-By: Raphael von der Grün <raphinesse@gmail.com>
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* chore: drop q module
* chore: fix & complete dropping q
* Fix faulty transformation of Q.when
* Simplify thenResolve transformation
* Removes unnecesary Promise wrapping in onFulfilled callback.
* Transform .done calls to .then or .catch
* The important thing is that we always handle rejections.
* Remove Q from specs
Requires Jasmine 3.5
* Replace Q.timeout w/ Promise.race & custom function
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* chore: added execa dependency
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* chore: execa - drop superspawn in android_sdk
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* chore: execa - drop superspawn in build
* chore: execa - drop superspawn in check_reqs
Plus: Remove useless trimming of execa output
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* chore: execa - drop superspawn in emulator
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* chore: execa - drop superspawn in device
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* chore: execa - drop superspawn in run_java_unit_tests
* chore: execa - drop superspawn in ProjectBuilder
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* chore: execa - drop superspawn in adb
* chore: execa - drop superspawn in plugin.spec
* chore: execa - replace child_process in log
* chore: execa - replace child_process in check_reqs
* chore: execa - replace child_process in emulator
Co-authored-by: エリス <erisu@users.noreply.github.com>
* (android) Added android bundle support
with some corrected tests
added bundle specific output
* with --packageType flag to have consistency with cordova-ios
* warn about missing required signing params only if at least one signing param is present
* produce error on run if packageType = bundle
* added comments relating to shelljs as suggested
* unit test case added by @brodybits - Chris Brody
* Filled in error message and unit test spec
Primary author: @breautek - Norman Breau <norman@normanbreau.com>
Co-authored-by: Norman Breau <norman@normanbreau.com>
Co-authored-by: Chris Brody <chris@brody.consulting>
This function used to give a different order depending on the behavior
of Array.prototype.sort(), which led to a test failure on Node.js 12
(see apache/cordova-android#767).
This update gives a consistent sort order, regardless of the
JavaScript engine implementation, now succeeds on Node.js
versions 6, 8, 10, and 12.
Resolves#767
For reference:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
* Remove uses-sdk from AndroidManifest.xml
since uses-sdk values are now superseded by Gradle files
* remove elementtree no longer needed
* remove internal capitalize function no longer needed
* remove AndroidManifest SDK version tests no longer needed
resolves#629
- fix download link
- put download link on its own line
- no punctuation at the end of the download link
(fixes#618)
- no extra newline at the end
- extra newline spacing in case JAVA_HOME is invalid
* Improve target-dir restriction for detecting new android project structure used in plugin.xml. (#575)
* Clarify old source-file declaration way from the new one and improve ambiguous code.
* Better check `src/main` forms.
* Replace path search with RegExp vars.
* Fix RegExp in order to match `/` or `EOL`.
* Remove template strings for NodeJS 4 support (wanted in case we port these changes to `7.1.x` at some point).
* Add pointer to deprecation plan in GH-580.
(subdirectories) such as "appco", with unit tests to verify
Needed for @katzer plugins that use de/appplant subdirectory,
for example:
* cordova-plugin-local-notifications
* cordova-plugin-badge
* cordova-plugin-background-mode
Also needed for cordova-plugin-inappbrowser
Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Julio César <jcesarmobile@gmail.com>
Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
We have this of the package name. It only outputs that the current one is bad, not what the current one actually is. Added an output of the current one to the error.
Fallback to old path mapping if no Android Studio path mapping exists
Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Kyle Kirbatski <kkirbatski@gmrmarketing.com>
- General Code Refactor
- Removed builder type argument from getBuilder API
- Removed any reference of conditional statements around builder type
- Remove plugin handler install and uninstall option flag android_studio
- Remove --gradle flag references
- Fixed plugin handler install and uninstall pathing issues
- Added parseBuildOptions export so run can get build related options.
- Use the nobuild flag option to control the run build.
- Updated test spec to reflect the changes.
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
is intended as a quick reference, for complete details please see our Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Platforms affected
Android
### What does this PR do?
This is the last unit test PR for today, I promise! The `AndroidProject` tests were originally in #458. This PR also contains increased test coverage for `android_sdk.js`. I have also refactored that to remove `Q`, as with the other PRs I submitted today.
### What testing has been done on this change?
Run unit tests
### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [x] 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.
- [x] Added automated test coverage as appropriate for this change.
Prior to this change, JS files without extension had not been linted.
To match them, we need a combination of positive and negative globbing
that does not mix well with the existing file selection for linting. Thus, we use
npm-run-all to run two ESLint invocations unconditionally in sequence
while still preserving the error code.
* Lint JS w/out extension too
* Fix newly surfaced linting errors
* Make use of npm-run-all for test script too
Fixes issue where commands that list images will crash when an image with a version not present in `android-versions` is encountered, as is presently the case with API 27:
```
cordova run android --list
Available android devices:
Available android virtual devices:
LEVEL: null
ERROR: TypeError: Cannot read property 'semver' of null
An unexpected error has occured while running list-emulator-images with code 2: Error: /home/chris/Repositories/acp-guidelines/cordova/platforms/android/cordova/lib/list-emulator-images: Command failed with exit code 2
```
Signed-off-by: Chris Alfano <chris@jarv.us>