* 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
* try to allow changing min sdk version
* undo testing with cdvMinSdkVersion=21
* Update framework/build.gradle
No printing of default behaviour
Co-authored-by: Norman Breau <norman@nbsolutions.ca>
* Update framework/build.gradle
typo + match case of cdvMinSdkVersion
Co-authored-by: Norman Breau <norman@nbsolutions.ca>
* resolve PR feedback timbru
Co-authored-by: Norman Breau <norman@nbsolutions.ca>
`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`.
* test(Api): do not clobber global events.emit w/ spy
* test(Api): remove unnecessary rewiring
* test(check_reqs): add missing spyOn call
* test(check_reqs): fix process.env restoration
* test(check_reqs): restore module under test before each test
This makes it easier to map test output to files and allows for common
setup & teardown of all tests in a file.
* test(prepare): wrap in top-level describe block
* test(Api): wrap in top-level describe block
* 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