NativeScript / NativeScript/nativescript-cli
Removing plugin which has dependencies with native code won't clean the platform
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
Description
Problem:
Installing a plugin, which depends on other plugins with native dependencies will not trigger a platform clean (especially necessary when building for android) when removed.
Suppose we have tns-core-modules, which is purely javascript. It depends on tns-core-modules-widgets which comprises of native android and iOS plugins.
tns-core-modules
'--tns-core-modules-widgets
Versions:
CLI: 2.5
Android runtime: 2.5/3.0
modules: any version
Steps to reproduce:
tns create myTestApp
cd myTestApp
tns build android <- at this point tns-core-modules are added as a dependency
The build process will generate build artifacts with the specific version of its native dependencies (tns-core-modules-widgets) This can be verified by finding tns-core-modules-widgets inside the 'platforms/android/configurations' dir.
tns plugin remove tns-core-modules <- will not trigger gradle clean - https://github.com/NativeScript/nativescript-cli/blob/master/lib/services/android-project-service.ts#L377
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/services/android-project-service.ts around line 377 and reproduce the listed Android build and plugin-removal steps. Inspect platforms/android/configurations before and after removing tns-core-modules; done means removal triggers the platform clean so native dependency artifacts are no longer retained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- build-system, cli, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100