I'm just starting to play with gradle. Can I assign variables based on their previously assigned value? For instance, how can I use versionName
from the defaultConfig in the free and paid flavors?
For instance, how could I use
android {
...
defaultConfig {
...
versionName "1.0"
}
...
productFlavors {
free {
versionName = versionName + "_free"
...
}
paid {
...
}
}
...
}
so versionName is "1.0_free"
for the free flavor. Is this possible?