[TIMOB-9028] CLI: "build" command for Android apps
GitHub Issue | n/a |
Type | Epic |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-10-19T01:19:37.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | 2013 Sprint 21, 2013 Sprint 21 Core, Release 3.2.0 |
Components | Android, CLI |
Labels | androidbuild, ay-verified, cb-verified, core, planning-3.2.0, rock_solid |
Reporter | Stephen Tramer |
Assignee | Chris Barber |
Created | 2012-05-07T17:06:33.000+0000 |
Updated | 2017-03-22T17:04:56.000+0000 |
Description
Port the Python-based Android builder.py to Node.js. Portions of this has already been completed.
Build Process
* Validate command line arguments and tiapp.xml settings (TIMOB-14973)
* fire "build.pre.construct" event
* create Builder object
* fire "build.pre.compile" event
* Detect if need to force rebuild (TIMOB-14974)
* Init the build/android directory and files (TIMOB-14976)
* if not --build-only
** make sure adb server is running (adb lib does this for us)
** wait for the emulator/device to boot
** detect if app is already installed (adb lib does this for us)
* Compile resources (TIMOB-14977)
* determine Google APIs are required (true unless not build only and building for emulator running non-Google API AVD)
* if building for emulator and using Ti.Map.MapView, make sure the emulator is running Google APIs (TIMOB-5438 Compiler Warning When Using Maps with Non-Google APIs SDK) (TIMOB-6860 Tooling: Android build process requires "Google APIs" even if "Ti.Map.createView" only occurs in comments)
* generate build/android/bin/assets/index.json with contents of build/android/bin/assets
* generate jss stylesheet => build/android/gen//ApplicationStylesheet.java
* generate aidl
* process build/android/res/*.xml for all i18n strings
** support app.xml to localize app name (TIMOB-2824 Android: App name localization)
* handle splash screen
* generate build/android/res/values/theme.xml
* Create android.manifest (TIMOB-14978)
* remove duplicate res in xml files???
* Build Java files and run dexer (TIMOB-14979)
* if not --build-only and not package build, push deploy.json to emulator/device
** wait for sdcard
*** gracefully handle timeouts (TIMOB-11827 Android: Installing an app to Android with 4.2 version takes long time)
* Package and sign app (TIMOB-14980)
* fire "build.post.compile" event
* fire "build.finalize" event
----
Hooks
* Package Hook (TIMOB-14981)
* Run Hook (TIMOB-14982)
----
Misc
* logcat
* wait for emulator
* delete unused support/android/templates/AppUserData.java
* when subprocessing Java-based tools (android, etc), override "_JAVA_OPTIONS" environment variable (TIMOB-14322 CLI: Setting _JAVA_OPTIONS global variable breaks building of project)
* convert default "dark" splash screen to a red-based one (TIMOB-4517 Android: default.png file is a gray image, should be the red default image)
* TIMOB-11120 Android: Expose a way for users to exclude js files from being encrypted
* TIMOB-339 Android: Missing Icons
* TIMOB-13311 Android: CLI: possibility to build apk for beta release (like ios adhoc) (should be resolved with build profiles)
* remove dependency on old Android SDKs (TIMOB-13983 Android: Titanium should use the latest stable Android SDK and NDK and not depend on 2.2 API 8)
Comments
JSON Source
For the task "copy Resources directory" (and other "copy" tasks"), please make sure to NOT copy/adopt the read-only flag that is set on every source file and image by some source-control programs. This will avoid the current problem where a second build cannot overwrite files in the build directory that are marked read-only.
PR: https://github.com/appcelerator/titanium_mobile/pull/4781
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/4853
Closing ticket as fixed.