Skip to content

Commit 9f288e4

Browse files
committed
添加sourceJar任务
1 parent d3061c7 commit 9f288e4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: build.gradle

+10
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,20 @@ jar {
158158

159159
jar.finalizedBy('reobfJar')
160160

161+
task sourceJar(type: Jar) {
162+
archiveClassifier.set('sources')
163+
from sourceSets.main.allJava
164+
}
165+
166+
artifacts {
167+
archives sourceJar
168+
}
169+
161170
publishing {
162171
publications {
163172
mavenJava(MavenPublication) {
164173
artifact jar
174+
artifact sourceJar
165175
}
166176
}
167177
repositories {

0 commit comments

Comments
 (0)