File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 17
17
apply plugin : ' maven'
18
18
apply plugin : ' signing'
19
19
20
+ // SonaType upload
21
+
20
22
if (! hasProperty(' sonatypeUsername' )) {
21
23
ext. sonatypeUsername = ' '
22
24
}
Original file line number Diff line number Diff line change @@ -93,6 +93,32 @@ sourceSets {
93
93
}
94
94
}
95
95
96
+ // Source & Docs artifactrs
97
+
98
+ task sourceJar (type : Jar ) {
99
+ description = ' Builds a source jar artifact suitable for maven deployment.'
100
+ classifier = ' sources'
101
+ from sourceSets. main. java
102
+ }
103
+
104
+ task javadoc (type : Javadoc , overwrite :true ) {
105
+ source = sourceSets. main. allJava
106
+ classpath = sourceSets. main. compileClasspath
107
+ }
108
+
109
+ task javadocJar (type : Jar ) {
110
+ description = ' Builds a javadoc jar artifact suitable for maven deployment.'
111
+ classifier = ' javadoc'
112
+ from javadoc. destinationDir
113
+ }
114
+ javadocJar. dependsOn javadoc
115
+
116
+ build. dependsOn sourceJar, javadocJar
117
+
118
+ artifacts {
119
+ archives sourceJar, javadocJar
120
+ }
121
+
96
122
task copyMod ( type :Copy , dependsOn : ' classes' , description : ' Assemble the module into the local mods directory' ) {
97
123
into " build/mods/$moduleName "
98
124
from compileJava
You can’t perform that action at this time.
0 commit comments