Hi,
I need to extend a gradle build file with some new functionality.
I’ve encapsulated the new code in a new class inside the gradle file and use the object in a method called by a a task.
task << {
doSth()
}
def doSth() {
...
NewFunctionalityClass myClass = new NewFunctionalityClass(var1, var2);
myClass.doSthElse();
...
}
class NewFunctionalityClass {
...
def doSthElse() {...}
...
}
The created class is quite large and I would like to extract it to a new file.
Could you give a hint what’s the best way to do this?
I’ve read about “apply from: ‘other.gradle’”, but as far as I understand it requires creating another task.
Thanks in advance,
Michał