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