mirror of
https://github.com/runelite/plugin-hub.git
synced 2025-12-23 22:48:49 -05:00
templateplugin: add shadow jar task
This commit is contained in:
@@ -29,7 +29,33 @@ dependencies {
|
||||
group = '${group_id}'
|
||||
version = '${version}'
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
options.release.set(11)
|
||||
}
|
||||
|
||||
tasks.register('shadowJar', Jar) {
|
||||
dependsOn configurations.testRuntimeClasspath
|
||||
manifest {
|
||||
attributes('Main-Class': '${package}.${plugin_prefix}PluginTest', 'Multi-Release': true)
|
||||
}
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
from sourceSets.main.output
|
||||
from sourceSets.test.output
|
||||
from {
|
||||
configurations.testRuntimeClasspath.collect { file ->
|
||||
file.isDirectory() ? file : zipTree(file)
|
||||
}
|
||||
}
|
||||
|
||||
exclude 'META-INF/INDEX.LIST'
|
||||
exclude 'META-INF/*.SF'
|
||||
exclude 'META-INF/*.DSA'
|
||||
exclude 'META-INF/*.RSA'
|
||||
exclude '**/module-info.class'
|
||||
|
||||
group = BasePlugin.BUILD_GROUP
|
||||
archiveClassifier.set('shadow')
|
||||
archiveFileName.set("$${rootProject.name}-$${project.version}-all.jar")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user