简体   繁体   English

如何引用gradle依赖source.jar

[英]How to refer to gradle dependency source.jar

I want to pass the dependency-xyz-sources.jar that gradle downloads as a parameter to another plugin (specifically j2objc ) 我想将gradle下载的dependency-xyz-sources.jar作为参数传递给另一个插件(特别是j2objc)

Is there a way to have a reference to the downloaded source jar? 有没有办法参考下载的源jar?

I assume you are using the gradle j2objc plugin? 我假设您正在使用gradle j2objc插件? 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. 简而言之,您需要确保所添加的gradle编译依赖项指定了特定版本(no +或未指定),并且指定的依赖项提供了-sources.jar。 After that, if you add autoConfigureDeps true to the top of your j2objcConfig closure it will pick up the sources. 然后,如果将autoConfigureDeps true添加到j2objcConfig闭包的顶部,它将获取源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM