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.

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-surefire-plugin</artifactId>
	<version>2.18.1</version>
	<configuration>
		<properties>
			<property>
				<name>listener</name>
				<value>my.company.MyRunListener</value>
			</property>
		</properties>
	</configuration>
</plugin>

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.