Update build script to produce a sources jar
This commit is contained in:
parent
f732de83e2
commit
2ab68ce7f3
1 changed files with 21 additions and 0 deletions
21
build.gradle
21
build.gradle
|
@ -53,9 +53,24 @@ dependencies {
|
|||
|
||||
def MAVEN_PASSWORD_PROPERTY = "AriasCreationsMavenPassword"
|
||||
|
||||
task sourceJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
from sourceSets.main.allJava
|
||||
archiveClassifier("sources")
|
||||
|
||||
manifest {
|
||||
attributes([
|
||||
"Specification-Title": project.name,
|
||||
"Specification-Vendor": "zontreck",
|
||||
"Specification-Version":"${version}"
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact sourceJar
|
||||
artifact jar
|
||||
}
|
||||
}
|
||||
|
@ -71,4 +86,10 @@ publishing {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileJava.finalizedBy("sourceJar")
|
||||
artifacts {
|
||||
jar
|
||||
sourceJar
|
||||
}
|
Loading…
Reference in a new issue