Reexport/use a jar inside anothe jar

Hi,

I have a jar that contains several external jars in a lib folder.
I would like to expose these jars and use them in a project that depends on it.
I created a simplified example to help comprehend my situation:

  • projectJ is the original jar to reexport.
  • projectA has a lib folder that contains projectJ
  • projectB depends on projectA and tries to use JarClass contained in projectJ

Here the example
test-export-jar.zip (197.1 KB)

run this scripts to test this out, last gradle build fails:

cd projectJ && ./gradlew publishToMavenLocal
&& cd …/projectA && ./gradlew publishToMavenLocal
&& cd …/projectB && ./gradlew build