How to do late binding


(Menaka J) #1

Hi Peter,

By default in the plugin we have assigned some default value for a property which is of type List convention.groovy List assembleBaseName = []

void assembleBaseName(String args) {

assembleBaseName.addAll(args.split() as List)

}

Plugin.groovy assembleBaseName = [“xyz”,“def”]

How to overwrite the “assembleBaseName” from build.gradle file?when we tried to overwrite like below from build.gradle file, we still get the default value. assembleBaseName = [“bar”]


(Menaka J) #2

I am trying acheive something implemented in the java plugin. If we want to name a jar with diiffernt name, we can specify "archivesBaseName " in gradle file to overwrite the default.