Skip to content

Commit f2bb691

Browse files
committed
build: restore PlaceholderAPI repo for CI
1 parent f0eefc4 commit f2bb691

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

build.gradle.kts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group = "com.modnmetl"
6-
version = "1.1.4"
6+
version = "1.1.5"
77

88
java {
99
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
@@ -12,41 +12,30 @@ java {
1212
repositories {
1313
mavenCentral()
1414
maven("https://repo.papermc.io/repository/maven-public/")
15+
// PlaceholderAPI repo (needed ONLY for compilation)
1516
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
1617
}
1718

1819
dependencies {
1920
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
2021
compileOnly("me.clip:placeholderapi:2.11.5")
21-
compileOnly("org.xerial:sqlite-jdbc:3.46.0.0") // provided by server / JVM
22+
implementation("org.xerial:sqlite-jdbc:3.46.0.0")
2223
}
2324

24-
2525
tasks.processResources {
2626
filesMatching("plugin.yml") {
2727
expand("version" to project.version)
2828
}
2929
}
3030

3131
/**
32-
* Uber jar that only bundles:
33-
* - your plugin classes
34-
* - sqlite-jdbc
35-
*
36-
* Paper + PlaceholderAPI stay as external plugins, not shaded in.
32+
* Lightweight jar: only your plugin classes + resources.
33+
* SQLite is provided by the server’s classpath, not shaded.
3734
*/
38-
tasks.register<Jar>("uberJar") {
39-
dependsOn(tasks.named("jar"))
40-
41-
// Final filename: modnvote-1.1.3.jar
35+
tasks.jar {
4236
archiveFileName.set("modnvote-${project.version}.jar")
43-
archiveClassifier.set("")
44-
45-
// Always include our own compiled classes
46-
from(sourceSets.main.get().output)
47-
48-
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
4937

38+
// keep it simple; nothing fancy here
5039
manifest {
5140
attributes["Implementation-Title"] = "ModNVote"
5241
attributes["Implementation-Version"] = project.version
@@ -55,8 +44,19 @@ tasks.register<Jar>("uberJar") {
5544
}
5645

5746
/**
58-
* Make the normal `build` task also produce the uberJar.
47+
* Legacy uberJar task – kept around in case you ever need
48+
* a fat jar again. CI / releases use the normal `jar` task.
5949
*/
60-
tasks.named("build") {
61-
dependsOn("uberJar")
50+
tasks.register<Jar>("uberJar") {
51+
dependsOn(tasks.named("jar"))
52+
archiveClassifier.set("")
53+
val runtimeCp = configurations.runtimeClasspath.get()
54+
from(sourceSets.main.get().output)
55+
from(runtimeCp.filter { it.name.endsWith(".jar") }.map { zipTree(it) })
56+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
57+
manifest {
58+
attributes["Implementation-Title"] = "ModNVote"
59+
attributes["Implementation-Version"] = project.version
60+
attributes["Built-By"] = "MODN METL"
61+
}
6262
}

0 commit comments

Comments
 (0)