Skip to content

Commit 50e17e9

Browse files
committed
output jar will now include documentations & sources
1 parent 3ff46e9 commit 50e17e9

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

build.gradle

+14-9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ configurations.all {
3333
}
3434
}
3535

36+
// Force character encoding in case the workspace was not set up correctly
37+
tasks.withType(Javadoc) {
38+
options.encoding = 'UTF-8'
39+
}
40+
tasks.withType(JavaCompile) {
41+
options.encoding = 'UTF-8'
42+
}
43+
tasks.withType(Test) {
44+
jvmArgs '-Dfile.encoding=UTF-8'
45+
}
46+
3647
shadowJar {
3748
archiveFileName = project.name + ".jar"
3849
destinationDirectory = file("build")
@@ -48,15 +59,9 @@ javadoc {
4859
options.tags = [ "apiNote" ]
4960
}
5061

51-
// Force character encoding in case the workspace was not set up correctly
52-
tasks.withType(Javadoc) {
53-
options.encoding = 'UTF-8'
54-
}
55-
tasks.withType(JavaCompile) {
56-
options.encoding = 'UTF-8'
57-
}
58-
tasks.withType(Test) {
59-
jvmArgs '-Dfile.encoding=UTF-8'
62+
java {
63+
withSourcesJar()
64+
withJavadocJar()
6065
}
6166

6267
publishing {

0 commit comments

Comments
 (0)