JUnit Listener Configuration In Gradle

I’m new bee to Gradle. Have custom JUnit Listener, which reads the custom annotation data and generates report and need to configure it as part of Gradle. Is there anyway to configure below surefire plugin in Gradle 4.4.


I understand that, it may not possible to use maven plugin as is in gradle. I checked TestListener, it doesn’t have support to read annotations to proceed with that.

I would like to understand the way to configure my JUnit Listener in Gradle.