NativeScript / NativeScript/android
[FR] Customize metadata generation to avoid adding unnecessary unused JS wrappers
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 563
- Forks
- 144
- Ø Merge
- 10 Std. 46 Min.
- Gemergte PRs (30 T.)
- 14
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Es werden keine Android-Dateien, Tests oder Einstiegspunkte genannt. Beginne mit dem verlinkten NativeScript CLI-Issue #5220 und dem entsprechenden iOS-Runtime-Issue #1209. Ermittle anschließend, wie die Generierung von Android-Metadaten die zusammengeführten Abhängigkeitslisten der App und der Plugins verwenden sollte. Die fertige Umsetzung sollte eine Opt-in-Möglichkeit zur Begrenzung der offengelegten Entitäten sowie eine Möglichkeit enthalten, das bestehende Verhalten, alles einzubeziehen, beizubehalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, javascript
- Bereich
- build-system, mobile-dev
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100