Uploaded image for project: 'Appcelerator CLI'
  1. Appcelerator CLI
  2. CLI-1355

Android "appc run" will always trigger rebuild if "tiapp.xml" is missing encryption policy property

    Details

    • Severity:
      Minor
    • Story Points:
      3
    • Sprint:
      2019 Sprint 17

      Description

      Summary:
      If the "tiapp.xml" file is missing property "appc-sourcecode-encryption-policy", then an Android "appc run" will alway trigger a rebuild.

      This is preventing incremental Android builds from working.

      Steps to reproduce:

      1. Create a default Alloy or Classic app from template.
      2. Build for Android via: appc run -p android --build-only
      3. Build for Android again using the above command line.
      4. In the build log, notice the following message

      [INFO]  Forcing rebuild: JavaScript files need to be re-encrypted
      

      Cause:
      The CLI's precompileHook() code is wrongly setting the AndroidBuilder object's "encryptJS" property to undefined if the "appc-sourcecode-encryption-policy" property was not found. This code should only set the "encryptJS" field to true if the encryption policy was found and set to "remote". Otherwise, it should leave the "encryptJS" field alone.
      titanium.js#precompileHook()

      Work-around:
      Add the following property to the "tiapp.xml" file.

      <?xml version="1.0" encoding="UTF-8"?>
      <ti:app xmlns:ti="http://ti.appcelerator.org">
      	<property name="appc-sourcecode-encryption-policy" type="string">none</property>
      </ti:app>
      

        Attachments

          Activity

            People

            • Assignee:
              shaig Samuel Haig
              Reporter:
              jquick Joshua Quick
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code