refactor!: do not copy JS lib to platform project #1269
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Finally, the moment we've all been waiting for! 🎉 😉
This PR does away with the questionable practice of copying the entire JS lib of
cordova-android
into each generated platform project – which had caused several issues and complications in the past.Description
node_modules
) to platform projectbin/templates/cordova/lib/
tolib/
bin/templates/cordova/Api.js
tolib/
bin/lib/create.js
tolib/
bin/templates/cordova/lib/plugin-build.gradle
tolib/builders
After these changes, the
cordova/
folder of a generated project only contains the bare minimum to maintain compatibility with existing cordova CLI versions (plusdefaults.xml
which IMHO should be moved in another PR). All of the remaining JS files in that folder require their dependencies via thecordova-android
module, so that needs to be resolvable somehow (which is the case for a platform project generated by the regular CLI workflow).Testing