[TIMOB-27719] Android: Remove python dependency from SDK build
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-06-30T14:53:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.1.0 |
Components | Android |
Labels | android, build, python, sdk |
Reporter | Joshua Quick |
Assignee | Christopher Williams |
Created | 2020-01-17T00:04:13.000+0000 |
Updated | 2020-06-30T14:53:47.000+0000 |
Description
*Summary:*
When building the Titanium SDK, the Android side currently uses python scripts to do some code generation. We should replace python scripts with node.js scripts so that we can get rid of our python dependency, thus simplifying the SDK build.
Apple will not pre-install "python" on the next version of macOS in the year 2020
https://developer.apple.com/documentation/macos_release_notes/macos_catalina_10_15_release_notes
*Note:*
Titanium's app and module builds do not require python. This is only an issue with SDK builds.
*Recommended Changes:*
In Titanium 9.0.0, we only run 2 python scripts via our "prebuild.js" script. These are the scripts we need to replace.
[titanium_mobile/android/titanium/prebuild.js](https://github.com/appcelerator/titanium_mobile/blob/70c16f7ca213f39791330758489be4f951dfa1ab/android/titanium/prebuild.js)
Once the above is done, we should be able to delete all python scripts from the following folder...
[titanium_mobile/android/runtime/v8/tools](https://github.com/appcelerator/titanium_mobile/tree/70c16f7ca213f39791330758489be4f951dfa1ab/android/runtime/v8/tools)
Our module build system has a "generate-cpp-files.js" script that does something extremely similar to what our SDK's python script does. https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/module/generated/generate-cpp-files.js Although the best solution may be to have our kroll-apt annotation processor do 100% of the code generation instead of splitting the code generation between it and these JS/python scripts. Doing this is a much bigger task.
https://github.com/appcelerator/titanium_mobile/pull/11723
merged to master for 9.1.0 target