Configure Gradle to publish sources and javadoc

后端 未结 4 539
南方客
南方客 2021-02-05 04:55

How do I configure Gradle to publish sources and javadoc jars to a repository?

4条回答
  •  既然无缘
    2021-02-05 05:28

    Paolo Fulgoni's answer used to work for until I bumped up my Gradle version to 3.1. To get the packageJavadoc Task to work with Gradle 3.1 I found I had to make a slight tweak to it as follows:

    task packageJavadoc(type: Jar) {
        from javadoc
        classifier = 'javadoc'
    }
    

提交回复
热议问题