[TIMOB-16869] CLI: Allow build configuration overrides in the tiapp.xml
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | CLI |
Labels | cb-tooling, titaniumlib |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2014-04-19T00:58:58.000+0000 |
Updated | 2020-03-06T21:35:55.000+0000 |
Description
This ticket is phase 2 of 3 phases:
1. Decouple settings from the deploy type and expose the defaults in an XML file that is in the SDK (TIMOB-12025)
2. Allow setting overrides in the tiapp.xml (this ticket)
3. Expose build configurations via command line options that allow selection of custom build configuration (TIMOB-16870)
Project level build configurations can override or extend the global build configurations. Below is an example where the "development" build configuration is overwritten and the "test" build configuration is extended.
<ti:app xmlns:ti="http://ti.appcelerator.org">
<id>com.appcelerator.testapp</id>
<name>testapp</name>
<version>1.0</version>
<analytics>true</analytics> <!-- enable analytics for all build configurations unless a build configuration explicitly disables it -->
<guid>0cf6aa04-a863-4a4c-8262-e8a04bc124f2</guid>
<property name="ti.ui.defaultunit" type="string">system</property>
<iphone/>
<android xmlns:android="http://schemas.android.com/apk/res/android"/>
<mobileweb/>
<modules>
<module platform="commonjs">ti.cloud</module>
</modules>
<deployment-targets/>
<build-configurations>
<configuration name="development">
<deploy-type>test</deploy-type> <!-- this overrides the default "development" unless --deploy-type was explicitly set -->
<property name="my-special-dev-only-prop" type="string">hello</property> <!-- this adds a new property only available for development builds -->
<analytics>false</analytics> <!-- this overrides the global value "true" -->
<minify-css>true</minify-css> <!-- this overrides the default value "false" -->
</configuration>
<configuration name="soasta-testing" extends="test">
<minify-js>false</minify-js>
<modules>
<module platform="android" version="1.0">com.soasta.touchtest</module>
</modules>
<mobileweb>
<analytics>
<use-xhr>true</use-xhr> <!-- override the default value of false -->
</analytics>
</mobileweb>
</configuration>
</build-configurations>
</ti:app>
No comments