Commit Graph

249 Commits

Author SHA1 Message Date
Norman Breau
3a9c87d3b8
fix(test): Native test namespace refactor (#1595) 2023-04-14 18:47:03 +09:00
エリス
4744bfe6bf
feat: support custom compileSdk setting (#1431)
* feat: support custom compileSdk setting
* chore: apply suggestions from code review
* chore: apply cdv-gradle-config-defaults.json suggestion
* fix: set compile sdk when null
* fix: move compileSdk null check to gradle
* fix: compile sdk requirement warning & display in gradle per subproject

Co-authored-by: Norman Breau <norman@nbsolutions.ca>
2022-05-18 23:18:33 +09:00
Norman Breau
5704ef9ea5
feat!: API 31 support (#1410)
* feat(breaking): API 31 support
* ci: bump actions/setup-java@3 w/ java 11
* ci: set setup-java distribution to adopt

Co-authored-by: Erisu <erisu@apache.org>
2022-04-17 19:43:45 +09:00
Raphael von der Grün
35f0d07521
build: build cordova.js during npm prepare (#1271) 2021-07-14 10:25:34 +02:00
Raphael von der Grün
16ff6e1b2f
refactor!: do not copy JS lib to platform project (#1269) 2021-07-13 11:01:50 +02:00
Norman Breau
510596f515
feat!: unify & fix gradle library/tooling overrides (#1212)
* enhancement: Control SDK versions and other default projects in one place
* fix: target/compile sdk usage
* refactor: cleanup gradle process
* chore: cleanup and remove unused changes
* chore: remove more unneeded FILE_PATH
* chore: fix lint error
* revert change intended to be part of a different PR
* chore: apply changes to revert to fit new changes
* fix: Ensure proper types
* breaking: Removed TempateFile class
  * Replaced the one and only usage of it with the properties-parser editor.
  * Breaking change because we are converting a method into an asynchronous method.
* refactor: Use the sync version of properties editor
* Gh 1178 fix sdk use gradlearg fix (#2)
* fix: readd gradleArg support
* fix: variable name
* refactor: remove unused mock variables
* Update bin/templates/cordova/lib/builders/ProjectBuilder.js
* Update bin/lib/create.js
* fix: const naming (review suggestion)
* fix: use defaults for framework building
* chore: apply review suggestion
* chore: rename config.json & defaults.json (review suggestions)
* refactor: updateUserProjectGradleConfig method
* refactor: minor changes in updateUserProjectGradleConfig
* refactor: major changes in updateUserProjectGradleConfig
* fix: wrong handling of missing preferences
* fix: usage of undefined this
* fix(create.spec): mocking of getPreference
* test(check_reqs): reduce diff size
* refactor: add wrapper to load gradle config defaults
* fix(check_reqs): get_target
  * Reads default SDK from default gradle config now
* fix(check_reqs.spec): return correct types from mocks
* revert to using get_target in create
* fix: e2e test

Co-authored-by: Erisu <ellis.bryan@gmail.com>
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
2021-07-06 15:38:28 +09:00
エリス
47aa116b1d
breaking: drop jcenter & update dependencies (#1251) 2021-07-03 13:04:13 +09:00
エリス
015db819ae
feat(allow-list)!: integrate and refactor core plugin (#1138)
* refactor!: naming to allow list
* feat(allow-list): integrate core plugin
* refactor(allow-list): cleanup
* refactor: drop deprecated launch-external case for CustomConfigParser::handleStartTag
* fix: apply review comments
2021-07-02 11:52:05 +09:00
jcesarmobile
01569ce71a
feat!: upgrade android gradle plugin to 4.2.1 (#1232) 2021-07-01 16:50:39 +09:00
Hans Krywalsky
2a84d7c44d
breaking: only support androidx (#1052)
* GH-841 only support androix
2021-04-16 06:52:14 +09:00
Mosab A
676f98d82d
feat!: upgrade kotlin@1.4.32 (#1204) 2021-04-14 11:29:09 +09:00
エリス
63b2356575
feat!: upgrade kotlin@1.4.31 (#1200)
* feat: upgrade kotlin@1.4.31 (#1176)

Co-authored-by: Mosab A <47486787+mosabab@users.noreply.github.com>
2021-04-13 17:50:05 +09:00
エリス
6588994586
feat!: upgrade android gradle plugin@4.1.3 (#1198)
* feat: upgrade gradle-plugin@4.1.3 (#1175)

Co-authored-by: Mosab A <47486787+mosabab@users.noreply.github.com>
2021-04-13 16:43:30 +09:00
エリス
46d4d924cc
feat!: upgrade gradle@6.8.3 (#1197)
* [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 wrapper.gradle
* chore: remove non-gradle wrapper changes
* feat: upgrade gradle@6.8.3 (#1174)

Co-authored-by: Mosab A <47486787+mosabab@users.noreply.github.com>
2021-04-13 15:35:34 +09:00
エリス
dc8854d16c
feat: target sdk 30 w/ build-tool 30.0.3 (#1182) 2021-04-13 15:34:21 +09:00
エリス
9071d5131a
Revert "[Frequent Updates] Gradle 6.6.1 & Android Gradle Plugin 4.0.1 & com.jfrog.bintray.gradle 1.8.5 (#1079)" (#1193)
This reverts commit 33476b4754.
2021-04-09 11:23:23 +09:00
エリス
c676ca98ff
revert: feat: upgrade kotlin@1.4.31 #1176 (#1194) 2021-04-09 11:23:09 +09:00
エリス
04b0106bca
Revert "feat: upgrade gradle-plugin@4.1.3 (#1175)" (#1189)
This reverts commit 1430304d36.
2021-04-08 14:04:26 +09:00
エリス
31233089f1
Revert "feat: upgrade gradle@6.8.3 (#1174)" (#1190)
This reverts commit fe4d4aeff0.
2021-04-08 14:03:34 +09:00
Mosab A
1430304d36
feat: upgrade gradle-plugin@4.1.3 (#1175)
* Update build.gradle

* Update build.gradle

* Update build.gradle

* Update build.gradle

* Update build.gradle

* Update build.gradle
2021-03-27 10:36:39 -03:00
Mosab A
2a92c2e595
feat: upgrade kotlin@1.4.31 (#1176)
* Update build.gradle

* Update build.gradle
2021-03-27 10:36:09 -03:00
Mosab A
fe4d4aeff0
feat: upgrade gradle@6.8.3 (#1174)
* Gradle Update to 6.8.3

* Update build.gradle

* Update wrapper.gradle

* Update wrapper.gradle
2021-03-27 10:35:27 -03:00
Norman Breau
97e2d15634
test(java): remove duplicate code in BackButtonMultipageTest (#1129)
* Removed duplicate code in test

* test: Remove duplicate code in BackButtonMultipageTest

Authored-by: leofernandesmo <leonardo.fernandes@ifal.edu.br>
Co-authored-by: breautek <norman@nbsolutions.ca>
2020-11-21 09:10:07 -04: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
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
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
Norman Breau
e86b211cd1
breaking: Bump android gradle plugin to 3.6.0 (#962) 2020-04-25 14:34:15 -03:00
Norman Breau
1ce2b6b315
test: synced androidx gradle versions to the same version as the android test (#959) 2020-04-15 23:42:33 -03:00
Bas Bosman
6402e7b755
Bump minSdkVersion to 22 and drop pre-Lollipop specific code (#915)
* 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
2020-04-03 19:54:08 +02:00
エリス
dee1e77d0b
feat: add kotlin support (#896)
Co-authored-by: Joshua Chandler <joshchandler88@gmail.com>
2020-01-27 16:14:58 +09:00
エリス
d01ed80a61
feat: add androidx support (#901) 2020-01-27 15:52:08 +09:00
Norman Breau
8ef742e79d feat: upgrade gradle to 6.1 & gradle build tools to 3.5.3 (#792)
* 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>
2020-01-21 19:24:00 +09:00
Norman Breau
5889001465
Increased default target sdk to 29 (#848)
* (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
2020-01-07 11:47:27 -04:00
エリス
0e6ad28e56
chore: drop q module (#833)
* 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>
2020-01-07 21:22:59 +09:00
Raphael von der Grün
fd57909730
chore: replace superspawn & child_process with execa (#862)
* 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>
2020-01-06 23:15:22 +01:00
エリス
3dac984613
Added Missing License Headers (#669) 2019-02-13 11:35:43 +09:00
Chris Brody
a6f30b6977
Android tools 3.3 & Gradle 4.10.3 update (#642)
Gradle 4.10.1 or higher is needed for Android Studio 3.3.0 ref:
- https://developer.android.com/studio/releases/gradle-plugin#3-3-0

Resolves #634 (Update Gradle classpath for Android Studio 3.3)
Resolves #596 (Support gradle 4.9+)
2019-02-09 19:35:46 -05:00
Jan Piotrowski
5f44af3757
improve test readme (#582)
<!--
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


### What does this PR do?


### What testing has been done on this change?


### Checklist
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [ ] 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.
- [ ] Added automated test coverage as appropriate for this change.
2018-12-04 20:38:31 +01:00
Darryl Pogue
f1f1ac3cbd
Updates for latest gradle/build tools
Ref GH-504.
2018-11-20 21:12:59 -08:00
Darryl Pogue
2c10545cd8
Always put the Google repo above jcenter 2018-10-23 08:21:05 -07:00
Gearoid M
8ee3a73dd1 Remove unused builders and add unit tests 2018-07-10 11:53:52 +09:00
Raphael von der Grün
6dad25668c Delete unused gradle-wrapper.properties for Java tests 2018-06-13 16:09:11 +02:00
Raphael von der Grün
032d1fa9cb Cleanup Java tests runner
* Print Gradle version used for Java tests during build
* Allow Java tests to be run from any directory
* Simplify Promise wrapping in Java tests runner
* Minor improvements
2018-06-13 16:09:08 +02:00
Raphael von der Grün
a254cfc841 Fix Java tests for older Gradle versions
Before this, Gradle 4.4 was required to build the Gradle wrapper and
thus run the Java tests. This was because of all the stuff that had to
be configured when running the wrapper task using the build.gradle file.

Now we use a config file that only specifies the required Gradle version
and nothing else to run the wrapper task. This allows tests to be run
with Gradle versions beginning with 2.
2018-06-13 16:09:04 +02:00
Raphael von der Grün
0d4b9f4ba6 Fix output and exit code for Java tests
This fixes the following issues:
* run_java_unit_tests.js always has exit code of 0 thus never failing
  the npm tests.
* "Tests completed successfully" is printed after failing to create the
  Gradle wrapper and never running the tests.
* Gradle errors are printed twice
2018-06-13 16:09:03 +02:00
Raphael von der Grün
02ee925103 Remove obsolete jshint comments (#444) 2018-05-21 18:02:14 +08:00
Joe Bowser
6cc4896690
Merge pull request #426 from infil00p/api_level_bump
CB-13724: Bump Target SDK to API 27
2018-01-17 11:48:51 -08:00
Joe Bowser
0d1692681f CB-13724: Updated the Android Tooling required for the latest version on both the test project, and the template 2018-01-04 15:35:04 -08:00
KIHARA Hideto
45a7b90c6c CB-12218: (android) Fix consistency of null result message
Fix problem that JavaScript receives ""(empty string) instead of null
if plugin sends null result from new thread.
2018-01-02 12:41:17 +09:00
Joe Bowser
be3f8ef80d CB-12914: Test needs SDK bumps 2017-12-14 13:48:19 -08:00