Gradle script questions

Hello. gradle tutorial a little bit unclear.
For example, lets take a look at XcodeBuild task.

Task name: moe<sourceset><mode><plat>XcodeBuild

Values for mode: Debug, Release
Values for plat: Iphoneos, Iphonesimulator
Task Properties
....
signingIdentity: name of the signing identity.
........

so, What the recommended way to set property, for example signingIdentity

What I do:

project.tasks.matching {
  it.name.startsWith('moe') && it.name.endsWith('XcodeBuild')
}.each {
  it.signingIdentity = "${rootProject.ext.signingIdentity}"
}

Is it right and recommended way to set that properties?

Dear zufarfakhurtdinov,

thanks for this remark, we will update our documentation to make it more clear how to set these options. For now, if you want to set the provisioningProfile and/or the signingIdentity, you can do it this way.

moe {
    ipaOptions {
        provisioningProfile '...'
        signingIdentity '...'
    }
}