Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10336] Tooling: Only include certain modules from tiapp.xml in build depending on deployment type

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-10-05T22:30:51.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Sprint 2012-20 Core, 2012 Sprint 20
ComponentsTooling
Labelscore
ReporterIngo Muschenetz
AssigneeOpie Cyrus
Created2012-08-07T15:36:07.000+0000
Updated2017-03-14T04:20:25.000+0000

Description

Some modules are only available or allowed in development or test environments, and should not be included in production builds. Suggest adding an attribute to the node in tiapp.xml with the deployment type for this module. * A non-existent deploy-type attribute indicates the module is available for all deployment types * If a module is available in multiple deployment types (i.e. development and production), the entry will appear twice
<modules>
  <module platform="iphone">ti.barcode</module>
  <module platform="iphone" deploy-type="test">ti.crittercism</module>
  <module platform="iphone" deploy-type="production">ti.crittercism</module>
</modules>

Comments

  1. Ingo Muschenetz 2012-09-25

    Fix in python, clone ticket for improvement against new CLI.
  2. Opie Cyrus 2012-10-03

    PR submitted: https://github.com/appcelerator/titanium_mobile/pull/3101 Spoke with Chris for Mobile Web and he said that this functionality is already supported for Mobile Web within the existing CLI implementation so no new ticket is required. Based on that, the associated fix for this ticket is limited to Android and iOS only. To test this change create both a iOS and Android Module called "mod1" and install that as needed. Create a test app within TiStudio and add the following to the tiapp.xml: ** this example is for iOS module inclusion but can be modified for Android module " mod1 mod1 mod1 " Once the tiapp.xml is updated, update the app.js with the example JS provided when the module was created and run the app. In regards to the expected behavior, in the above use case only a single instance of the module should be included in the app. The rules are as follows: 1) If a module entry does not specify a deploy-type flag then the default behavior is to be valid for all app deploy modes (legacy support) 2) If any of the matching module entries (module tag with the same id and platform) have a deploy-type set then legacy support for that id/platform combination is turned off (thus negating the rule in #1). Modules that fell under #1 are treated as having a deploy-type of !production in this case. 3) modules that have a deploy-type of 'production' will only be included if the app is being distributed 4) modules that have a deploy-type of anything other than 'production' will only be included if the app is being built for not distribution This mechanism should be tested out for both iOS and Android apps.
  3. Lee Morris 2017-03-14

    Closing ticket as fixed.

JSON Source