On Sun, Jan 4, 2015 at 7:46 AM, jay vyas <[email protected]> wrote:
> possibly a similar issue which I dealt with: I just added argument and user
> guidance stuff  into settings.gradle,
> https://github.com/apache/bigtop/blob/master/bigtop-tests/smoke-tests/settings.gradle

I think this is a fine approach, but I was looking for something more
generic. Consider
this: if I defined a custom task along the following lines:

class GreetingTask extends DefaultTask {
    String greeting = 'hello from GreetingTask'

    @TaskAction
    def greet() {
        println greeting
    }
}

I can then utilize it in my build.gradle as follows:

   GreetingTask {
        greeting = 'roman'
    }

I wish there was a generic way of doing and equivalent
from the command line a'la:

$ gradle GreetingTask -DGreetingTask.greeting=roman


Thanks,
Roman.

Reply via email to