how to tell gradle to download all the source jars

后端 未结 6 2065
暖寄归人
暖寄归人 2020-12-04 23:53

Ideally, we would like to add a task for downloading all the source jars for the first level and transitive dependencies of our project. Is there a way to do that?

<
6条回答
  •  情书的邮戳
    2020-12-05 00:01

    Another catch not mentioned in other answers is when you are using mavenLocal() repository in your gradle.build file. If there are downloaded jar in that local maven repo but no downloaded sources or javadocs in that repo, then gradle will not even try to download javadocs or sources for you. Even with enabled eclipse.classpath.downloadJavadoc and eclipse.classpath.downloadSources.

    The solution is to remove mavenLocal() from repositories or place it to bottom of the list. Or you can setup maven to download sources and javadocs and clean your maven local repository (~/.m2/repository).

    A more detailed description of the problem is here.

提交回复
热议问题