This is a question that has multiple parts.
Gradle seems to have 2 ways to define a function
Type one:
def func1 = { param -> ...}
Type 2
def func2 (OptionalType param){...}
I prefer to use Type 2 not only because I don't know how to define the type for a parameter for func1 (question part 1 is how to set the type for a func type 1 param), but also because it reads better.
But I found that I can do
subprojects { ext.func1 = func1 }
But
subprojects { ext.func2 = func2 }
doesn't seem to work, since I'd prefer to use function type 2 I'd like to know how to serve it to subprojects, I believe this must be possible but I can't find the right syntax. (question part 2)
I hope you guys can help me.