[TIMOB-3395] Android: JS source remains in APK after production build.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-30T14:26:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-13 |
Components | Android |
Labels | n/a |
Reporter | Don Thorp |
Assignee | Marshall Culpepper |
Created | 2011-04-15T03:43:46.000+0000 |
Updated | 2012-03-31T11:56:40.000+0000 |
Description
See http://developer.appcelerator.com/helpdesk/view/74171#c363433">Helpdesk 74171
JS source should not be available in production apk if compilation is turned on.
(from [1f28139158d5517c9801bb84d6e93af188f6bcbd]) don't include js source files when compiling for production mode. also remove binding JSON files from the generated APK
[#3395 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/1f28139158d5517c9801bb84d6e93af188f6bcbd"> https://github.com/appcelerator/titanium_mobile/commit/1f28139158d5...
To test this, build an application for Distribution, and open or extract the resulting APK with an unzipping program. Under the "assets/Resources" folder, there should be no .js files.
But it also removes potential JavaScript files that you're using in a local webview. You might even include big JavaScript libraries/frameworks that you use inside your webview, for example jQuery Mobile. These JavaScript files should not be deleted. Is there an option to ignore deletion of JavaScripts files for certain directory paths?
just rename the files you don't want converted to .jsx. There is no ignore option at them moment.
Currently occurs with both Rhino and v8 packaged .apks. SDK 1.8.0.1.v20111109152300
With V8, things work a little differently -- we actually bundle the obfuscated JS files directly instead of compiling to classes like we did with Rhino (there is no need for immediate bytecode form w/ V8). We'll probably need to change the test plan..
FWIW, Rhino bytecode compilation is currently known to be disabled as well (we plan on re-enabling it soon, and with that we can remove JS for Rhino APKs)
We need to revisit this when we re-enable bytecode compilation for rhino
Forgot to mark this as resolved
Closing bug. Verified fix on: SDK build: 2.0.0.v20120329191102 Runtime: v8, rhino Titanium Studio, build: 2.0.0.201203291340 Device: LG Slate (3.1)