11plugins {
2- ` java`
2+ java
33}
44
55group = " com.modnmetl"
@@ -16,27 +16,47 @@ repositories {
1616}
1717
1818dependencies {
19- compileOnly(" io.papermc.paper:paper-api:1.21.10 -R0.1-SNAPSHOT" )
20- compileOnly(" me.clip:placeholderapi:2.11.6 " )
21- implementation (" org.xerial:sqlite-jdbc:3.46.0.1 " )
19+ compileOnly(" io.papermc.paper:paper-api:1.21.1 -R0.1-SNAPSHOT" )
20+ compileOnly(" me.clip:placeholderapi:2.11.5 " )
21+ compileOnly (" org.xerial:sqlite-jdbc:3.46.0.0 " ) // provided by server / JVM
2222}
2323
24+
2425tasks.processResources {
2526 filesMatching(" plugin.yml" ) {
2627 expand(" version" to project.version)
2728 }
2829}
2930
31+ /* *
32+ * Uber jar that only bundles:
33+ * - your plugin classes
34+ * - sqlite-jdbc
35+ *
36+ * Paper + PlaceholderAPI stay as external plugins, not shaded in.
37+ */
3038tasks.register<Jar >(" uberJar" ) {
3139 dependsOn(tasks.named(" jar" ))
40+
41+ // Final filename: modnvote-1.1.3.jar
42+ archiveFileName.set(" modnvote-${project.version} .jar" )
3243 archiveClassifier.set(" " )
33- val runtimeCp = configurations.runtimeClasspath.get()
44+
45+ // Always include our own compiled classes
3446 from(sourceSets.main.get().output)
35- from(runtimeCp.filter { it.name.endsWith( " .jar " ) }.map { zipTree(it) })
47+
3648 duplicatesStrategy = DuplicatesStrategy .EXCLUDE
49+
3750 manifest {
3851 attributes[" Implementation-Title" ] = " ModNVote"
3952 attributes[" Implementation-Version" ] = project.version
4053 attributes[" Built-By" ] = " MODN METL"
4154 }
4255}
56+
57+ /* *
58+ * Make the normal `build` task also produce the uberJar.
59+ */
60+ tasks.named(" build" ) {
61+ dependsOn(" uberJar" )
62+ }
0 commit comments