I am generally hesitant to add more config files to cordova projects. I
would rather see us converge to package.json as the de facto config file
over config.xml in the future.

Aside from that, I do see the value in having a build.json file which
contains sensitive information (certs, passwords, signing identity) and
doesn't get packaged up with the app or checked in to git repos. So this
looks good to me. Also like the ideas for the future.

-Steve

On Mon, May 18, 2015 at 10:25 AM, Nikhil Khandelwal <[email protected]>
wrote:

> I want to bring this to the attention of everyone that I have added a
> build.json for specifying signing parameters for different platforms as
> part of cordova build. Here are the design principles I used:
>
> -          build.json should be used over config.xml for specifying build
> time behavior (as opposed to runtime). In the case of signing, it did not
> make sense to have paths to certs, passwords, signing identity info etc. to
> be part of config.xml and be packaged with the app itself.
>
> -          build.json file has the following schema:
> {
>                      "<platformName>" : {
>                                 "debug" : {
>                                                 "<propertyName>" :
> "<propertyValue>"
>                                 },
>                                 "release" : {
>                                                 "<propertyName>" :
> "<propertyValue>"
>                                 },
>                 }
>
> -          So far all properties that can be specified using build.json
> can be specified using command line args. Command line args take precedence
> if it's specified at both places.
>
> -          By convention, a file named 'build.json' on the project root
> alongside 'config.xml' will be passed to platform CLI scripts with its
> location using the '--buildConfig' argument. There is a PR for this here:
> https://github.com/apache/cordova-lib/pull/215
>
> Ideas for future:
>
> -          Cordova CLI will allow to specify a custom build.json
>
> -          Add docs for this talking about build.json
>
> -          Unify parsing logic for build.json & command line args across
> platforms in a shared module.
>
> -          Move some of the config.xml properties to build.json since they
> belong better there.
>
> Let me know if you have any questions, ideas or concerns related to this.
>
> Thanks,
> Nikhil
>
>
>

Reply via email to