Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-3395

Android: JS source remains in APK after production build.

    Details

      Description

      {html}<div><p>See <a href=
      "http://developer.appcelerator.com/helpdesk/view/74171#c363433">Helpdesk
      74171</a></p>
      <p>JS source should not be available in production apk if
      compilation is turned on.</p></div>{html}

        Issue Links

          Activity

          Hide
          Marshall Culpepper added a comment -
          {html}<div><p>(from <a href=
          "/projects/32238/changesets/1f28139158d5517c9801bb84d6e93af188f6bcbd"
          title=
          "Changeset [1f28139158d5517c9801bb84d6e93af188f6bcbd]">[1f28139158d5517c9801bb84d6e93af188f6bcbd]</a>)
          don't include js source files when compiling for production mode.
          also remove binding JSON files from the generated APK<br>
          [<a href="/projects/32238/tickets/3395" title=
          "Ticket #3395">#3395</a> state:fixed-in-qa] <a href=
          "https://github.com/appcelerator/titanium_mobile/commit/1f28139158d5517c9801bb84d6e93af188f6bcbd">
          https://github.com/appcelerator/titanium_mobile/commit/1f28139158d5...</a></p></div>{html}
          Show
          Marshall Culpepper added a comment - {html}<div><p>(from <a href= "/projects/32238/changesets/1f28139158d5517c9801bb84d6e93af188f6bcbd" title= "Changeset [1f28139158d5517c9801bb84d6e93af188f6bcbd] "> [1f28139158d5517c9801bb84d6e93af188f6bcbd] </a>) don't include js source files when compiling for production mode. also remove binding JSON files from the generated APK<br> [<a href="/projects/32238/tickets/3395" title= "Ticket #3395">#3395</a> state:fixed-in-qa] <a href= "https://github.com/appcelerator/titanium_mobile/commit/1f28139158d5517c9801bb84d6e93af188f6bcbd"> https://github.com/appcelerator/titanium_mobile/commit/1f28139158d5 ...</a></p></div>{html}
          Hide
          Marshall Culpepper added a comment -
          {html}<div><p>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.</p></div>{html}
          Show
          Marshall Culpepper added a comment - {html}<div><p>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.</p></div>{html}
          Hide
          connysvensson added a comment -

          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?

          Show
          connysvensson added a comment - 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?
          Hide
          Don Thorp added a comment -

          just rename the files you don't want converted to .jsx. There is no ignore option at them moment.

          Show
          Don Thorp added a comment - just rename the files you don't want converted to .jsx. There is no ignore option at them moment.
          Hide
          Eric Merriman added a comment -

          Currently occurs with both Rhino and v8 packaged .apks. SDK 1.8.0.1.v20111109152300

          Show
          Eric Merriman added a comment - Currently occurs with both Rhino and v8 packaged .apks. SDK 1.8.0.1.v20111109152300
          Hide
          Marshall Culpepper added a comment -

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

          Show
          Marshall Culpepper added a comment - 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..
          Hide
          Marshall Culpepper added a comment -

          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)

          Show
          Marshall Culpepper added a comment - 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)
          Hide
          Marshall Culpepper added a comment -

          We need to revisit this when we re-enable bytecode compilation for rhino

          Show
          Marshall Culpepper added a comment - We need to revisit this when we re-enable bytecode compilation for rhino
          Hide
          Marshall Culpepper added a comment -

          Forgot to mark this as resolved

          Show
          Marshall Culpepper added a comment - Forgot to mark this as resolved
          Hide
          Wilson Luu added a comment -

          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)

          Show
          Wilson Luu added a comment - 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)

            People

            • Assignee:
              Marshall Culpepper
              Reporter:
              Don Thorp
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development