[TIMOB-20570] Add support for "Resources" dir and --build-only to Android module build
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-03-16T18:29:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2016-03-03T17:30:09.000+0000 |
Updated | 2017-03-31T22:03:39.000+0000 |
Description
In SDK 5.2.0, we changed the behavior of the
platform/ios
directory where files are copied to the build directory instead of the output app directory. This broke several modules, so we added support for a "Resources" directory in the module's platform-specific subdirectory (TIMOB-20489).
This ticket is to add parity and support the "Resources" directory including:
* All files in the "Resources" directory will be copied to the Android output app directory: build/android/bin/assets/Resources
.
* Add a "Resources" folder to the android/templates/module/default/template/android
directory in the titanium_mobile repo. Copy the iOS readme into this "Resources" directory: iphone/templates/module/default/template/iphone/Resources/README.md
.
* Remove android/templates/module/default/template/android/platform/README
and replace with iphone/templates/module/default/template/iphone/platform/README.md
.
Also, we need to add support for the \-\-build\-only
flag. Should be similar to what was needed for the iOS module build:
* https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_buildModule.js#L61
* https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_buildModule.js#L597-L599
Master PR: https://github.com/appcelerator/titanium_mobile/pull/7848 5_3_X PR: https://github.com/appcelerator/titanium_mobile/pull/7849 5_2_X PR: https://github.com/appcelerator/titanium_mobile/pull/7850 To test:
Create a new module
Add some files to the
android/Resources
directoryRun "ti build -p android --build-only" or "appc run -p android --build-only" from the module's
android
directoryObserve that the it just builds the module... it doesn't create a Titanium app, build, and run it
Open the generated
dist/<name>.zip
and verify theResources
directory with the files existPRs merged.
Closing ticket as fixed.