From 97436cee47107beda2f7b6520effe73b88c95d6d Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 4 Oct 2024 17:35:25 -0400 Subject: [PATCH] regenerate example plugin --- build.gradle | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 37525d6..0c10810 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,33 @@ dependencies { group = 'com.example' version = '1.0-SNAPSHOT' -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': 'com.example.ExamplePluginTest', '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") +}