Commit Graph

4083 Commits

Author SHA1 Message Date
Raphael von der Grün
b245337501
refactor(ProjectBuilder): clean up output file collection code (#1099)
* 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
2020-11-21 10:44:56 +01:00
Raphael von der Grün
bb7d733cde
refactor: unify installation on devices & emulators (#1123)
* 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
2020-11-20 22:12:18 +01:00
Raphael von der Grün
aa679ea1d6
feat(Adb): list devices _and_ emulators in one go (#1125) 2020-11-19 21:30:56 +01:00
Raphael von der Grün
0e8234abfd
refactor(check_reqs): cleanup default Java location detection on Windows (#1102)
* 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
2020-11-19 21:08:43 +01:00
Pieter Van Poyer
d5b9029a23
Android - allow changing min sdk version (#1117)
* 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>
2020-11-18 13:48:46 -04:00
Raphael von der Grün
671e1fd1c6
refactor: remove copied Adb.install from emulator.install (#1108)
`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`.
2020-11-17 09:06:44 +01:00
エリス
c144c08112
fix(android): allow file access for existing behavior (#1111) 2020-11-04 14:15:26 +09:00
Raphael von der Grün
aada3e813d
refactor: do not kill adb on UNIX-like systems (#1103) 2020-10-22 18:03:28 +02:00
Raphael von der Grün
335b0f2575
test: fix unit test failures for certain random orders (#1094)
* 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
2020-10-19 10:38:37 +02:00
Raphael von der Grün
b1f01d7a65 test: ensure single top-level describe block in test file (#1094)
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
2020-10-19 10:01:09 +02:00
Darryl Pogue
3b56160d38
chore(asf): Update GitHub repo metadata 2020-10-06 20:24:23 -07:00
Norman Breau
39e315628e
fix: Reflect minimum required NodeJS (#1045)
Project uses APIs only added in 10.10, namely ProjectBuilder.js readdirSync(), with `withFileTypes` option.
https://nodejs.org/api/fs.html#fs_fs_readdirsync_path_options
2020-10-06 10:12:04 -03:00
Raphael von der Grün
e125ab1b9a
refactor(retry): simplify retryPromise using modern JS (#1086) 2020-10-06 10:56:21 +02:00
Raphael von der Grün
5d3591b853
refactor(utils): reduce number of utils (#1085)
* refactor(utils): remove utils.grep

* refactor(utils): replace utils.scanDirectory w/ fast-glob

Note that fast-glob is already in our dependency graph anyway.
2020-10-06 09:04:48 +02:00
Raphael von der Grün
206238893b
fix(prepare): fix pattern used to collect image resources (#1084)
The pattern contained an additional plus that slipped in during the
refactoring done in #842. See [the diff][1] for details.

[1]: 09e8248d1f (diff-26c51bfaa44eff1e46fd61ec3225ec13L640-R650)
2020-10-06 08:38:09 +02:00
Mosab A
33476b4754
[Frequent Updates] Gradle 6.6.1 & Android Gradle Plugin 4.0.1 & com.jfrog.bintray.gradle 1.8.5 (#1079)
* Update ProjectBuilder.js

* Update build.gradle

* Update build.gradle

* Update build.gradle

* Update build.gradle

* Update build.gradle

* Update wrapper.gradle

* Update build.gradle

* Update wrapper.gradle

* Update wrapper.gradle

* Update wrapper.gradle

* Update build.gradle

* Update build.gradle

* Update ProjectBuilder.js

* Update ProjectBuilder.js
2020-10-05 21:26:59 -03:00
Raphael von der Grün
2c888f418b
chore(pkg): remove deprecated no-op field "engineStrict" (#1081)
See https://docs.npmjs.com/files/package.json#enginestrict

Related to https://github.com/apache/cordova/issues/55
2020-10-04 13:32:28 +02:00
Norman Breau
565106fc1f
refactor: Stop suppressing un-needed TruelyRandom lints (#1046) 2020-08-11 10:13:33 -03:00
Norman Breau
a45217e6b9
ci: Added Node 14.x (#975) 2020-07-24 14:02:13 -03:00
Raphael von der Grün
d7790ca8bc
chore: remove unused emulator.create_image and its dependencies (#1019) 2020-07-09 00:07:33 +02:00
Raphael von der Grün
8ef8d994df
fix(pluginHandlers): properly check if path is inside another (#1014) 2020-07-08 23:31:16 +02:00
Raphael von der Grün
80ad635348
test(pluginHandlers/common): better setup & teardown (#1013) 2020-07-08 15:15:53 +02:00
Norman Breau
ec944cf068
fix: gradle ignore properties (#1018) 2020-07-05 11:19:56 -03:00
Raphael von der Grün
ba5781c3bf
refactor: save ProjectBuilder instance in Api instance (#1016)
This reduces dependence on the `builders` module and reduces repitition.

This also facilitates another WIP refactoring I am working on.
2020-07-03 18:54:24 +02:00
Raphael von der Grün
d86cb99dd5
Remove unnecessary stuff (#1015)
* Remove licenses for previously bundled packages

* Remove utils module with duplicate function

* Remove unused function check_reqs.check_ant

* Remove unused test helper
2020-07-03 18:53:10 +02:00
Raphael von der Grün
3204b9804b
test(java): fix, improve and move clean script (#1017)
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
2020-07-03 18:50:53 +02:00
Raphael von der Grün
ce735256d3
test: fix missing stack traces in jasmine output (#1012)
`true` is not a valid value for the `displayStacktrace` option of
jasmine-spec-reporter.
2020-07-02 22:39:03 +02:00
Erisu
cccf812454
Set package-lock.json to 9.1.0-dev 2020-06-24 12:28:24 +09:00
Erisu
f7e1979665
Update JS snapshot to version 9.1.0-dev (via coho) 2020-06-23 18:33:24 +09:00
Erisu
49fc5da207
Set VERSION to 9.1.0-dev (via coho) 2020-06-23 18:33:21 +09:00
Erisu
5276f56cc4
android-v9.0.0 Updated version and RELEASENOTES.md for release 9.0.0 2020-06-23 18:31:47 +09:00
エリス
9df6793f34
chore: set AndroidX off by default (#1005) 2020-06-23 16:13:04 +09:00
Duy Mac Van
d90e191837
Accept multiple mime types on file input (#971) 2020-06-18 09:59:44 -03:00
Norman Breau
d5d448888d
fix: support both adaptive and standard icons at the same time (#1001) 2020-06-18 09:58:42 -03:00
Norman Breau
8d8600b442
fix: Plugin install fails when preview sdk is installed (#985) 2020-06-18 09:58:14 -03:00
Chris Brody
0bf6455153
cleanup yaml files (#994)
* remove trailing spaces from .asf.yaml
* remove trailing spaces from .eslintrc.yml
* add newline to end of .eslintrc.yml
2020-06-16 19:34:10 -04:00
Chris Brody
80b7a7f6ac
cleanup: remove trailing spaces from Java sources (#999)
* remove trailing spaces from framework/src/org/apache/cordova/*.java
* remove trailing spaces from framework/src/org/apache/cordova/engine/*.java
2020-06-16 19:26:48 -04:00
Chris Brody
6b789c57e8
update some dependencies (#992)
* update cordova-common -> ^4.0.1
* update execa -> ^4.0.2
* update fs-extra -> ^9.0.1
2020-06-10 11:47:17 -04:00
Chris Brody
b8a344fc17
cleanup: remove trailing spaces from framework build files (#998)
* remove trailing spaces from framework/build.xml
* remove trailing spaces from framework/cordova.gradle
2020-06-10 09:32:43 -04:00
Chris Brody
1b6319e9cf
cleanup: remove trailing spaces from project template (#997)
* remove trailing spaces from bin/templates/project/AndroidManifest.xml
* remove trailing spaces from bin/templates/project/assets/www/css/index.css
2020-06-10 09:31:51 -04:00
Chris Brody
2cc81253ff
cleanup: remove trailing spaces from bat files (#996)
* remove trailing spaces from bin/*.bat
* remove trailing spaces from bin/templates/cordova/lib/*.bat
2020-06-10 09:30:51 -04:00
Chris Brody
499c694146
remove trailing spaces from markdown files (#995)
* remove trailing spaces from .github/ISSUE_TEMPLATE.md
* remove trailing spaces from .github/ISSUE_TEMPLATE/BUG_REPORT.md
* remove trailing spaces from .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
* remove trailing spaces from CONTRIBUTING.md
2020-06-10 09:29:14 -04:00
Chris Brody
bc32cca281
update devDependencies (#993)
* update jasmine-spec-reporter -> ^5.0.2 in devDependencies

* update nyc -> ^15.1.0 in devDependencies
2020-06-10 09:27:11 -04:00
Chris Brody
dead4b4ab6
breaking: reduce combined response cutoff to 16 MB (#987)
* breaking: reduce combined response cutoff to 16 MB
* rename `MAX_PAYLOAD_SIZE` to `COMBINED_RESPONSE_CUTOFF`
* update some comments
* cleanup: split `if` statements into multiple lines
2020-06-09 19:48:33 -04:00
Chris Brody
305cb2cdd5
major: Gradle 6.5 & Android Gradle plugin 4.0.0 updates (#988)
* feat: Gradle 6.5 & Android Gradle plugin 4.0.0 updates

* update test/android/wrapper.gradle to reference Gradle 6.5

* update test/androidx/wrapper.gradle to reference Gradle 6.5

* update spec/fixtures/android_studio_project/build.gradle
  to reference com.android.tools.build:gradle:4.0.0

* update test/android/build.gradle
  to reference com.android.tools.build:gradle:4.0.0

* update test/androidx/build.gradle
  to reference com.android.tools.build:gradle:4.0.0
2020-06-08 20:47:10 -04:00
Chris Brody
287bfcbaa3
cleanup: remove trailing spaces from app/build.gradle (#990)
(in the template)
2020-06-08 12:42:38 -04:00
Chris Brody
2a61b751ab
breaking: remove legacy/build.gradle from template (#989) 2020-06-08 10:42:15 -04:00
Norman Breau
a830145f36
fix: wait_for_boot waiting forever (#978) 2020-05-22 15:07:18 -03:00
GimpArm
08dc1dd9b9
Increased detectArchitecture() timeout (#965)
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>
2020-05-22 15:06:11 -03:00
Norman Breau
e86b211cd1
breaking: Bump android gradle plugin to 3.6.0 (#962) 2020-04-25 14:34:15 -03:00