Skip to content

Commit 4eeb89f

Browse files
committed
docs: document thin jar build and privacy guarantees
1 parent ef7d53e commit 4eeb89f

3 files changed

Lines changed: 48 additions & 6 deletions

File tree

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/modnvote.main.iml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
`java`
2+
java
33
}
44

55
group = "com.modnmetl"
@@ -16,27 +16,47 @@ repositories {
1616
}
1717

1818
dependencies {
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+
2425
tasks.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+
*/
3038
tasks.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

Comments
 (0)