I have a feeling that issue or at least question should be raised on Groovy compiler side, because
in both cases Groovy compiler generates an additional class with a body of Closure/Lambda,
however this class in the case of new Java-like syntax is marked as synthetic - see ACC_SYNTHETIC in output of command
javap -v -p target/classes/org/jacoco/groovy/lambda/demo/GreeterDemo\$_greetFromLambda_lambda1.class
whereas is not marked in another case - see output of command
javap -v target/classes/org/jacoco/groovy/lambda/demo/GreeterDemo\$_greetFromClosure_closure2.class
If Groovy 3 compiler will not be marking class in the first case as synthetic,
consistently with how it does and was doing Groovy 2 compiler for the second case,
then JaCoCo without any changes will be showing coverage for the new Java-like syntax.
So that's why in my opinion will be valuable to receive an authoritative answer from developers of the Groovy compiler whether or not this can be done on their side.
And if not, then why and what will they advise for JaCoCo as a way to detect code of lambda expressions.
Regards,
Evgeny