NativeScript / NativeScript/nativescript-cli
CLI does not handle deleted files from App_Resources/Android/src
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
Description
If a user adds some Java/Kotlin files in the App_Resources/Android/src folder and runs a build, the files are copied into the platforms/android/app/src folder.
If the user, however, deletes some file in App_Resources/Android/src and triggers a second build, this does not change the state of the platforms/android/app/src directory.
Issue seems to be due to this logic: https://github.com/NativeScript/nativescript-cli/blob/master/lib/services/android-project-service.ts#L294
The whole implementation of the prepareAppResources method could probably be improved with setting an additional value provided to srcDir in the build.gradle
sourceSets {
main {
java {
srcDir 'src/src'
}
}
}
As for the libs folder, it's probably a good idea to attach it as an implementation filetree(<libs_path>) in the dependencies block in the build.gradle
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 in lib/services/android-project-service.ts at prepareAppResources and inspect the related build.gradle sourceSets and dependencies handling. Reproduce the issue by building, deleting a file under App_Resources/Android/src, and building again; done means the generated platforms/android/app/src state reflects deletions as well as additions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, javascript, kotlin
- Domain
- build-system, cli, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100