I have a script to prepare build of an apk.
It defines some value which has some random specific for each build value:
def salt = generateSalt()
def generatedSalt() {
return generateRandomlySalt
}
In the same script I want to have another method which will operate on this value.
def generateMapAndSalt() {
// here is additional logic which depends on the defined salt
generateEncodedHash(certificate, salt, shaKey)
}
There is another method inside of android closure which will pass this defined salt value to the buildConfigFiles. How do I reference once generated salt value from defined method? Tired accessing it with following syntax:
this.$salt
$salt
salt
With no luck.
You can define the salt in an ext
block and refer to it via project
instance.
ext {
salt = generateSalt()
}
project.salt
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments