Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3395] Android: JS source remains in APK after production build.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-03-30T14:26:42.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-13
ComponentsAndroid
Labelsn/a
ReporterDon Thorp
AssigneeMarshall Culpepper
Created2011-04-15T03:43:46.000+0000
Updated2012-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.

Comments

  1. Marshall Culpepper 2011-04-15

    (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...

  2. Marshall Culpepper 2011-04-15

    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.

  3. connysvensson 2011-09-15

    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?
  4. Don Thorp 2011-09-15

    just rename the files you don't want converted to .jsx. There is no ignore option at them moment.
  5. Eric Merriman 2011-11-10

    Currently occurs with both Rhino and v8 packaged .apks. SDK 1.8.0.1.v20111109152300
  6. Marshall Culpepper 2011-11-11

    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..
  7. Marshall Culpepper 2011-11-11

    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)
  8. Marshall Culpepper 2011-12-07

    We need to revisit this when we re-enable bytecode compilation for rhino
  9. Marshall Culpepper 2012-03-30

    Forgot to mark this as resolved
  10. Wilson Luu 2012-03-30

    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)

JSON Source