NativeScript / NativeScript/nativescript-cli
CLI does not handle deleted files from App_Resources/Android/src
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu trong lib/services/android-project-service.ts tại prepareAppResources và kiểm tra cách xử lý các sourceSets và dependencies liên quan trong build.gradle. Tái hiện sự cố bằng cách build, xóa một tệp trong App_Resources/Android/src rồi build lại; hoàn tất khi trạng thái platforms/android/app/src được tạo ra phản ánh cả các tệp đã xóa lẫn các tệp được thêm vào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, java, javascript, kotlin
- Lĩnh vực
- build-system, cli, mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100