* (android) Feature: Write name of the Android app to .idea/.name for Android Studio #1172
* Missing space before function parentheses.
* Add test for writeNameForAndroidStudio #1172
* Use ES6 for new code. Code DRYness in test spec. #1172
Co-authored-by: エリス <erisu@users.noreply.github.com>
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
Update spec/unit/java.spec.js
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
Update spec/unit/java.spec.js
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
Update bin/templates/cordova/lib/utils.js
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
Update bin/templates/cordova/lib/check_reqs.js
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
Update spec/unit/check_reqs.spec.js
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
Update spec/unit/check_reqs.spec.js
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* - linting
- platform independent paths in testing
- addes some unittest
- remove duplication + add comments
- delete webp's if png's added, delete png's if webp' added.
- Update bin/templates/cordova/lib/prepare.js Co-authored-by: エリス <erisu@users.noreply.github.com>
- fix https://github.com/apache/cordova-plugin-splashscreen/issues/257 webp support for android
* revert changes
* refactor: use source extension for target in getImageResourcePath
* fix(prepare): include more extensions in initial splash-screen resource map
* tests(prepare): quick-fix for tests
* backward slashes must be changed to forward slashes for fast-glob package.
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
* refactor(ProjectBuilder): less repetitive fileSorter
This reverts the fileSorter to the state from before #937, but using our
own simple re-implementation of `compare-func`.
* fix(ProjectBuilder): apply sort RegExp to basename only
* refactor(ProjectBuilder): use fast-glob instead of hand-rolled equivalent
* refactor(ProjectBuilder): factor out common isPathArchSpecific
* refactor(ProjectBuilder): use includes instead of indexOf
* refactor(ProjectBuilder): move sorting into findOutputFilesHelper
* refactor(ProjectBuilder): simplify findOutputFiles signature
* refactor: unify installation on devices & emulators
This change replaces the almost identical methods `device.install` and
`emulator.install` with the generic `target.install`.
* fix: use unified installation in platform-centric bins
* test(check_reqs): test default Java location detection on Windows
* refactor(check_reqs): use glob for default Java location detection on Windows
This changes the implementation to be closer to what it was before #842
with everything being in one place.
* fix: remove always-taken if statement
* feat: take both Program Files variants from env
* refactor(check_reqs): cosmetic changes
`emulator.install` contains a copy of the code of `Adb.install` just to
be able to pass custom options to `execa`.
This change removes that duplicated code in favor of a new option in
`Adb.install` that allows to pass options through to `execa`.
* Remove licenses for previously bundled packages
* Remove utils module with duplicate function
* Remove unused function check_reqs.check_ant
* Remove unused test helper
This includes the following changes:
- move this developer-only script to test/ where it conceptually belongs
- this also prevents it from being distributed with this package
- fix paths for `android` and `androidx` variants
- make paths relative to the script, not to CWD
- use `removeSync` instead of `existsSync` and `existsSync`
- rename npm script to `clean:java-unit-tests` to clarify scope
The timeout for detechArchitecture() is sometimes too low when devices are on wifi network connections and even sometimes over USB. The command can take up to 3 seconds to execute and return. Currently the timeout is set to 1000 ms and setting it to 5000 ms seems to be a good compromise.
Co-authored-by: Scott Downing <Scott.Downing@marc-cain.de>
This commit does the following:
- Makes ANDROID_SDK_ROOT the primary variable to look for the Android SDK location.
- Makes ANDROID_HOME the fallback variable, if ANDROID_SDK_ROOT is not present/valid.
Gradle updates:
Note that the following gradle updates were required, otherwise the android gradle plugin did not honour the ANDROID_SDK_ROOT variable.
- Updates the framework's android studio's gradle plugin from version 3.3.0 to 3.5.3.
Not only this is required for android's gradle to obey ANDROID_SDK_ROOT, it is now in sync with the Android test project/
- Updates the Androidx test project to use gralde plugin from version 3.3.0 to 3.5.3, to match Android Test & framework.
- Consequentially, this required to also upgrade AndroidX test project to use Gradle 6.1, which also matches both the Android test project & framework
These changes above fixes#949
Additionally, since we update the environment variables dynamically, the environment variable printout produced misleading information.
The environment variable printout will now print out the variable as defined by the user (before the tooling messes with them). An additional log
is printed that tells the user exactly what Cordova is going to use for the Android SDK path. This should fix#670
* feat: bump minSdkVersion to 22
BREAKING CHANGE: drop KitKat support
* chore: remove obsolete comment
* feat: remove pre-Lollipop specific code
* chore: remove KitKat from needsKitKatContentUrlFix
* chore: other minor cleanup