Test fails for Gradle 5.1.1while using hk2 metadata generator version 2.5.0

Hi,

I am doing migration of project to jdk11. I am using gradle 4.10.3 with jdk11, my junit tests using hk2, mockito are running fine, I see a meta-inf folder created as /.out/classes/java/test/META-INF/hk2-locator/default and default contains the contract details.

Once I upgrade to gradle 5.1.1, jdk11. junit, test classes using hk2 fails throwing MultiException.

eg:

org.glassfish.hk2.api.MultiException at ABCDTest.java:74 Caused by: org.glassfish.hk2.api.UnsatisfiedDependencyException at ABCDTest.java:74

I see that META-INF/hk2-locator/default is not created as a result it does not find contract details.

I am not sure why change in gradle version is not creating META-INF folder.

my dependencies are

implementation group: ‘org.glassfish.hk2.external’, name: ‘aopalliance-repackaged’, version: ‘2.5.0-b61’
implementation group: ‘org.glassfish.hk2’, name: ‘hk2-locator’, version: ‘2.5.0-b61’
implementation group: ‘org.glassfish.hk2’, name: ‘hk2-metadata-generator’, version: ‘2.5.0-b61’

Any help will be appreciated.

Thanks.