Can I override the 'group' property from the command-line?

I’ve tried “” & “” but neither seems to work. My build.gradle looks similar to this:

… subprojects {

group = “”

task printProps << {

println “group: $”


… } …

I forgot to mention in my original post, but “” is what always gets printed.

Hi, unfortunately overriding of plugin properties like group via cmd line properties as you tried it above is not yet supported. As a workaround you can define a custom property like “cmdGroup” and reassign it to the group property. have a look at the following snippet:

apply plugin:'java'
  group = ""
   //check if -P property is set on command line
 //& assign it to the group property
 group = cmdGroup
  task printProps << {
  println "group: $"

now you can set your group via command line by calling “


Rene, that did the trick. Thanks for the information and the work-around.