[TIMOB-2209] Android: Re-enable incremental build
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-10-19T01:08:16.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 21, 2013 Sprint 21 Core, Release 3.2.0 |
Components | Android, Tooling |
Labels | android, androidbuild, ay-verified, cb-verified, defect, tooling |
Reporter | Marshall Culpepper |
Assignee | Chris Barber |
Created | 2011-04-15T03:13:36.000+0000 |
Updated | 2013-11-11T19:24:07.000+0000 |
Description
Before all of our new changes for stylesheet and RA.java code generation we knew when new Java code was generated so we could skip the javac and dex parts of the APK building process. We need to go back through and make sure to only dex/javac when necessary.
IMHO this should be a blocker for the 1.5.0 release, since I imagine this problem is going to give a very poor experience for Android developers. I have a 2009-era Mac Mini and even if I just make a one-line change in a javascript file I have to wait 5-10min for Titanium to rebuild and show me my change in the emulator :(. It's a big enough problem for me that I'm having to stop Android development and shift my time over to hacking up a fix for this.
+1 ...would be thrilled to reduce the multi-minute build times whenever I make a code change on Android (even if it's not as good as it is with the iPhone, where you can just make a change in a source file and it will be reflected the next time that file is iterated, rebuild or not)
Here's a workaround until they fix it; brings my re-build times down to 5 seconds :)
Open android/builder.py and change
self.build_generated_classes()
generated_classes_built = True
to (making sure you have the whitespace correct)
generated_classes_built = False
if manifest_changed or self.tiapp_changed or self.deploy_type == "production":
self.build_generated_classes() generated_classes_built = True else:
info("Manifest unchanged, skipping Java build")
With proper formatting (I hope):
More changes needed now:
In builder.py within build_and_run, change
toAnd in builder.py within package_and_deploy, change
to(may need to be conditionally skipped based on if a full build is being done or not; haven't confirmed yet)
Any updates on this? I'm getting back into Android development and very sad to find it still broken in 1.6.1 :(
PR: https://github.com/appcelerator/titanium_mobile/pull/4781
Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311100540 Titanium SDK, build: 3.2.0.v20131110134044 CLI: 3.2.0 Alloy: 1.3.0 Successfully built android project for emulator 2.3.3 incrementally. Closing