浏览代码

Javadoc gradle configuration

Lortseam 4 年之前
父节点
当前提交
39eed42907
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      build.gradle

+ 11 - 0
build.gradle

@@ -56,6 +56,16 @@ jar {
 	from "LICENSE"
 }
 
+task javadocs(type: Javadoc) {
+	source = sourceSets.main.allJava
+}
+
+task javadocsJar(type: Jar, dependsOn: javadocs) {
+	classifier = "javadocs"
+	javadocs.failOnError false
+	from javadocs.destinationDir
+}
+
 // configure the maven publication
 publishing {
 	publications {
@@ -67,6 +77,7 @@ publishing {
 			artifact(sourcesJar) {
 				builtBy remapSourcesJar
 			}
+			artifact javadocsJar
 		}
 	}