How to refer to gradle dependency source.jar

200 views Asked by At

I want to pass the dependency-x.y.z-sources.jar that gradle downloads as a parameter to another plugin (specifically j2objc )

Is there a way to have a reference to the downloaded source jar?

1

There are 1 answers

0
Jared On

I assume you are using the gradle j2objc plugin? See here. In short, you need to make sure the gradle compile dependency you add specifies a specific version (no + or unspecified) and that the specified dependency provides a -sources.jar. After that, if you add autoConfigureDeps true to the top of your j2objcConfig closure it will pick up the sources.