* feat!: Upgrade to Gradle and AGP 8
* java 17
* feat!: API 34 Support
API 34: Upgrade AGP from 8.2.0-rc01 to 8.2.0-rc02
API 34: Upgrade AGP from 8.2.0-rc02 to 8.2.0-rc03
API 34: Upgrade AGP from 8.2.0-rc03 to 8.2.0
feat: add AndroidKotlinJVMTarget preference to set the kotlin JVM target
This is in addition to the java source / target compatibility preferences.
AndroidKotlinJVMTarget is only affective if Kotlin is enabled.
chore: Upgrade Gradle from 8.4 to 8.5
AGP 8.2.0 -> 8.2.1
Gradle 8.5 -> 8.7
fix: Add --validate-url to gradle wrapper commands
AGP 8.4.0
* fix(test): ProjectBuilder using Gradle 8.3, no longer supported version
* API 34: Change Kotlin JVM Target default.
The new default value is null. When null, it will by default
to the Java Target compatibility. Updating AndroidJavaTargetCompatibility
will also influence the Kotlin JVM target, unless if AndroidKotlinJVMTarget
is also explicitly defined.
* removed leftover debug prints
* API 34: Gradle Wrapper
* API 34: ratignore generated gradle wrapper files
* fix gradle wrapper jar via git attributes
* fix(test): normalise gradle paths
* fix(windows): Gradle paths
* fix(windows): Keep CRLF endings for bat files
* chore: Updated license for Gradle Wrapper 8.7 pointer
* API 34 Support Gradle Tools project
* API 34: omit --validate-url on installing the wrapper
* revert: LICENSE notice on bundling the gradle wrapper jar
* Revert: AGP 8.4 -> 8.3
* test(ci): Added NodeJS 22 to the test matrix
---------
Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
* fix: remove ANDROID_HOME's DEPRECATED text
* fix: check_gradle to check ANDROID_HOME first ANDROID_SDK_ROOT last
* fix: set ANDROID_HOME
* chore: deprecate flag on ANDROID_SDK_ROOT
* move mainactivity.java
* unit test for moving mainactivity.java
* fix new unit test
* eslint fixes
* add explicit elementtree npm dependency
Co-authored-by: David Wedgbury <david.wedgbury@telent.com>
* fix(Api): do not infer project root from script location
* fix(builders): do not infer project root from script location
* fix(target): do not infer project root from script location
* test(e2e): cleanup and extend E2E tests
- Renames the file with the only existing E2E test
- Makes existing test use the API instance returned by
`Api.createPlatform`
- Adds another test that ensures we can still require the API from
`platformProjectPath/cordova/Api.js`
* fix(check_reqs): do not infer project root from script location
* refactor(run)!: get rid of emit-and-throw & throw-literal antipatterns
* refactor(run)!: convert run method to async/await
* refactor(run): require build module in advance
* refactor(run): minor cleanup
* refactor(run): drop always-undefined option arch
`parseBuildOptions` only sets `arch` if something truthy is passed for
parameter `resolvedTarget` to which we pass `null`.
* refactor(run): destructure buildOptions
* 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>
This basically fixes up the changes from #1220.
* test(env/java): replace test that duplicates implementation
* test(env/java): stub _ensure to focus on unit under test
* test(env/java): add test for invalid output
* refactor(env/java): keep try block small
* refactor(env/java): shorten excessive comment
* fix: Java version parsing if java executable prints out additional information with --version
* fix: Ensure JAVA_HOME path comes first in the PATH environment
* refactor: Removed redundent code in favour of keeping a change introduced from another PR
* fix(requirements check): use regex to get java version from javac output
* fix(lint): format code
* fix(node 10): remove optional chaining from version check
* refactor(emulator)!: remove support for legacy `android` binary
`emulator.list_images` now always uses the `avdmanager` binary.
* refactor(android_sdk)!: remove support for legacy `android` binary
`android_sdk.list_targets` now always uses the `avdmanager` binary.
* refactor(check_reqs)!: do not look for legacy `android` binary
* refactor: replace installation instructions involving `android` binary
* (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`.
* 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