CLI does not handle deleted files from App_Resources/Android/src
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- android, java, javascript, kotlin
- Domain
- build-system, cli, mobile
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.
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
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
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.
More from NativeScript/nativescript-cli
-
in-progress
NativeScript/nativescript-cli#6140 · 2 comments · 1 assignee ·
-
NativeScript/nativescript-cli#6090 · 1 assignee ·
-
in progress
NativeScript/nativescript-cli#6015 · 1 reaction · 1 assignee ·
-
question
Difficulty 4/5 3-5 days Newbie friendliness 48/100
NativeScript/nativescript-cli#5992 · 5 comments ·
-
feature-pending-triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
NativeScript/nativescript-cli#5975 ·
All issues in NativeScript/nativescript-cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·