2

I want to execute Hello method in class using gradle task(at springboot). The sample is like below.

class MyClass
{
    public void Hello()
    {
        System.out.println("Hello World");
    }
}

Is there any way to execute Hello function in gradle task?

I had added below and tried but below task cannot parse MyClass token.

task myTest{
    doLast {
        println "Executing MyClass method"
        def v = new MyClass();
        v.Hello();
    }
}
Martin Zeitler
  • 1
  • 19
  • 155
  • 216
Wien 1683
  • 65
  • 6

0 Answers0