[TIMOB-25562] CLI: Automatically migrate native Android modules to SDK 7 during module-build
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-11-28T21:09:44.000+0000 |
Affected Version/s | Release 7.0.0 |
Fix Version/s | Release 7.0.0 |
Components | Android |
Labels | android, migration, module |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2017-11-27T11:20:52.000+0000 |
Updated | 2017-12-09T10:37:52.000+0000 |
Description
The V8 update forces module developers to recompile their modules, which can be quite a pain when having many modules to maintain. I would propose a small module-build hook inside the
_buildModule.js
that takes care of this by detecting the currently selected SDK and then migrates the module automatically, by:
- bumping the apiversion
to 4
- setting the minimum-sdk to 7.0.0
- adding the arm64-v8a
architecture
- optionally (recommended): bumping the version to the next major to indicate a new major version
We may want to ask the developer to confirm the changes, e.g. by printing the new file. It would greatly improve the dev-experience during module recompiling and could be the subject of our planned post about migrating to SDK 7.
PR (including some open discussions): https://github.com/appcelerator/titanium_mobile/pull/9631
Verified the fix with SDK 7.0.0.v20171129100330. Closing.
Little bug:
description
field will be the modulename
after an auto update. It is still in the .bak file so you can copy it over againThis is because the module template sets the
description
key to the module name by default:description: <%- moduleName %>
. But I fixed it as part of TIMOB-25592, thanks!