Add a new task to essentials, and update the dependency version of libz

This commit is contained in:
Aria 2023-02-28 09:28:36 -07:00
parent 09a532b742
commit bf7d99fff6
2 changed files with 23 additions and 3 deletions

View file

@ -162,10 +162,31 @@ jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
// publish.dependsOn('reobfJar')
task devJar(type: Jar) {
from sourceSets.main.output
from sourceSets.main.allJava
classifier = 'dev'
manifest {
attributes([
"Specification-Title": project.name,
"Specification-Vendor": "zontreck",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": version,
"Implementation-Vendor": "zontreck",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
devJar.finalizedBy('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
artifact devJar
}
}
repositories {
@ -174,7 +195,6 @@ publishing {
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}