-
-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Description
We may parse the JS files at build time and extract the native Android types that need to be extended. With this information in hand we may generate *.java files with the desired overrides and then pass the control back to the build process. This will eliminate the runtime class generation, which will boost the performance significantly, especially when the application is loaded for the first time.
Type Generation
- Parse the JavaScript files (using UglifyJS).
- Extract the types that need bindings.
- Generate *.java files for the extracted types.
Type Resolution
- Update the logic in the DexFactory.resolveClass method. The already statically generated types should be available in the System ClassLoader and we need to check there first.
Process Automation
- Hook into ant's extension points.
- Generate the JAVA files and add them to the application project.
- Continue with the build process, letting the default dex maker generate the *.dex files and put them in the application's classes.dex file.
This task is a prerequisite for issues #87, #88 and will partially fix #96.