Hey I am having some issues adding a signing my release build variant. Currently I am using the experimental gradle 2.5 with the new android gradle plugin version 0.1.0.
The right way to do this with the latest version of the Android plugin (0.6.0-alpha3) is as follows:
android.signingConfigs {
create("release") {
storeFile = file("../keys.keystore")
storePassword = "st0r3pa$$"
keyAlias = "SecretKey"
keyPassword = "k3ypa$$"
}
}
android.buildTypes {
release {
signingConfig = $.android.signingConfigs.get("release")
}
}
In Gradle 2.9 which is used by this version of the plugin, the declared rules can depend on each other using a special syntax: $.
. The trick is to create the signing config as usual, then assign it to a field in a different rule using this syntax. Gradle will realize that the signing configuration is an input dependency and will let you access it.