refactor(android): rewrite old python scripts in Node.js #11723
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA: https://jira.appcelerator.org/browse/TIMOB-27719
Description:
In working on PR #11693, I was doing a lot of work on our build/startup for iOS/Android and ran across our usage of these very old scripts to generate under the hood files for Android. We already had some code for doing the C string byte array baking stuff from titanium_mobile_windows, so I copied it over and the work grew to get rid of these last python scripts.
The generation of the bootstrap.js was partially ported from the old python script, but I removed some logic that was unused in the SDK's modern/existing bindings (i.e. having to merge multiple definitions of the same module/proxy together).
Note that there's an nearly-identical process in the native module template: generate-cpp-header-files.js. That implementation intentionally doesn't use npm packages to do it's work. Long-term it should simply point at the SDK to do the work for it (i.e. these new Node scripts should be "formalized" and shipped in the built SDK and that file should just mostly defer to them)