NativeScript / NativeScript/android
[FR] Customize metadata generation to avoid adding unnecessary unused JS wrappers
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 563
- Fork
- 144
- Merge trung bình
- 10 giờ 46 phút
- Pull request đã merge (30 ngày)
- 14
Mô tả
Is your feature request related to a problem? Please describe.
Currently, the whole Android SDK and all native libraries used in a {N} app are included in the metadata binary files. In order to reduce app size and improve startup performance, we should allow app/plugin developers to specify which entities (e.g. Java packages) need to actually be accessible from JavaScript.
Additional context
Things to consider:
- This will be a breaking change because every plugin and every app which directly call into native code will need to start stating their native dependencies
- Multiple such dependency lists coming from all plugins and the app should be merged. Maybe some changes in the CLI will be necessary as well.
- There should be a way to allow everything to be included (like it's been before this feature)
An idea for UI which helps generate these lists from @shirakaba: Polyfill.io shows one user interface by which one could generate a package by specifying only the libraries that one needs. Maybe something like this could be applied to the NativeScript runtimes: https://polyfill.io/v3/url-builder/
Corresponding feature request in iOS runtime is: https://github.com/NativeScript/ios-runtime/issues/1209
Implemented in {N} CLI with: https://github.com/NativeScript/nativescript-cli/issues/5220
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
Không có tệp Android, bài kiểm thử hoặc điểm vào nào được nêu. Hãy bắt đầu với issue #5220 của NativeScript CLI được liên kết và issue #1209 tương ứng của iOS runtime, sau đó xác định việc tạo metadata Android nên sử dụng các danh sách dependency đã hợp nhất của ứng dụng và plugin như thế nào. Phần hoàn thành cần bao gồm một cách opt-in để giới hạn các entity được expose và một cách để duy trì hành vi hiện tại là bao gồm mọi thứ.
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, javascript
- Lĩnh vực
- build-system, mobile-dev
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100