You found a bug! We've classified it as SDKTOOLS-527 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    413
    Vote Rating
    18
    jweber will become famous soon enough

      0  

    Default What are the different Ant config files for?

    What are the different Ant config files for?


    This is using Sencha Cmd 3.1.2.342 with a Sencha Touch 2.2.1 app.

    In .sencha/app, there are:

    Code:
    build.properties
    native.properties
    package.properties
    production.properties
    testing.properties
    sencha.cfg
    A few questions:
    • What belongs in sencha.cfg as opposed to build.properties? If I run sencha ant -Dfoo=bar, the value I pass on the command line seems to be overridden by sencha.cfg. But if I run sencha config -prop foo=bar then app build production, the command-line value takes precedence. So I'm a little confused.
    • Which of these, if any, should we be changing, if we need to change a build property?
    • Why does build-impl.tmpl try to load a property file at ${basedir}/../../local.properties? Why would there be a local.properties two levels above the base dir?

  2. #2
    Ext JS Premium Member burnnat's Avatar
    Join Date
    Jun 2011
    Posts
    418
    Vote Rating
    61
    burnnat is a jewel in the rough burnnat is a jewel in the rough burnnat is a jewel in the rough burnnat is a jewel in the rough

      0  

    Default


    I can't answer the first two questions, but for your last question, remember that ${basedir} is the parent dir of the build file - so in build-impl.xml, ${basedir} is the same as ${app.dir}/.sencha/app. Two directories above that is the application root - and if you put a local.properties file there but leave it unversioned, that allows developers to add personal configurations there without having them pushed to other members of the team.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    20
    Vote Rating
    2
    mike.arps is on a distinguished road

      0  

    Default


    1.) sencha.cfg is more of a high level cfg that applies differently depending on the context. See the Configuration Files section - http://docs.sencha.com/touch/2.2.1/#...mmand_advanced for the breakdown of the hierarchy

    build.properties is geared towards build-specific properties for all target environments of your build. The environment specific properties are applied after the build.properties for the specific environment you are targeting. (sencha app build -environment testing, would apply testing.properties after build.properties). see .sencha/app/build-impl.xml for more info

    The second issue is a bug, command line arguments should always win.

    2.) This is dependent on the environment you are building for. If it is a build property for all environments it should get added to build.properties, otherwise update the ${args.environment}.properties file.

    After doing this, the properties will be available in the extension points in build.xml. (ex: -after-build)

    3.) @burnnat nailed it.

    I hope this helps.

    Cheers

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    413
    Vote Rating
    18
    jweber will become famous soon enough

      0  

    Default


    Thanks, that's helpful. Do you need me to file a report for the command-line issue, or do you have it?

    So sencha.cfg contains some properties used by Ant, and others used by Sencha Cmd itself, right?

    For the Ant properties, what's the order of precedence, in relation to the other .properties files mentioned? Should the order be this (first one wins)?
    • command line arguments
    • sencha.cfg files
    • other .properties files

    Thanks,
    Jacob

  5. #5
    Sencha User
    Join Date
    Oct 2012
    Posts
    20
    Vote Rating
    2
    mike.arps is on a distinguished road

      1  

    Default


    I have filed this issue, no worries there

    Indeed, we do use sencha.cfg both internally and for the Ant process.

    The precedence is as you mention with the following notes: sencha.cfg follows the hierarchy rules specified in the guide and the .properties file is only included when doing a build.

    Cheers

Thread Participants: 2

Tags for this Thread