3
0
Mirror von https://github.com/Moulberry/AxiomPaperPlugin.git synchronisiert 2024-11-17 05:40:06 +01:00
Dieser Commit ist enthalten in:
Jason Penilla 2021-07-08 19:57:49 -07:00
Ursprung 7f3ecfd42f
Commit 39f1a61c2f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0E75A301420E48F8
2 geänderte Dateien mit 136 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,113 @@
From fb950cd96500ed930aa561c5f03e777a6c9cec24 Mon Sep 17 00:00:00 2001
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date: Thu, 8 Jul 2021 19:56:34 -0700
Subject: [PATCH] Setup dev bundle publishing
Gradle property `publishDevBundle` must be set to publish the dev bundle, ex `./gradlew publishToMavenLocal -PpublishDevBundle`. Patches must be already applied in order to generate the dev bundle.
---
build.gradle.kts | 49 ++++++++++++++++++++++++++-------------------
settings.gradle.kts | 1 +
2 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/build.gradle.kts b/build.gradle.kts
index cf0754603..23db4352c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,7 +1,8 @@
plugins {
java
+ `maven-publish`
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
- id("io.papermc.paperweight.core") version "1.1.8"
+ id("io.papermc.paperweight.core") version "1.1.9-LOCAL-SNAPSHOT"
}
subprojects {
@@ -25,16 +26,6 @@ subprojects {
filteringCharset = Charsets.UTF_8.name()
}
- configure<PublishingExtension> {
- repositories {
- maven {
- name = "paperSnapshots"
- url = uri("https://papermc.io/repo/repository/maven-snapshots/")
- credentials(PasswordCredentials::class)
- }
- }
- }
-
if (name == "Paper-MojangAPI") {
return@subprojects
}
@@ -58,16 +49,6 @@ repositories {
onlyForConfigurations("paperclip")
}
}
- maven("https://maven.quiltmc.org/repository/release/") {
- content {
- onlyForConfigurations("paramMappings", "remapper")
- }
- }
- maven("https://files.minecraftforge.net/maven/") {
- content {
- onlyForConfigurations("decompiler")
- }
- }
}
dependencies {
@@ -85,6 +66,10 @@ paperweight {
spigotApiPatchDir.set(layout.projectDirectory.dir("patches/api"))
spigotServerPatchDir.set(layout.projectDirectory.dir("patches/server"))
+ paramMappingsRepo.set("https://maven.quiltmc.org/repository/release/")
+ remapRepo.set("https://maven.quiltmc.org/repository/release/")
+ decompileRepo.set("https://files.minecraftforge.net/maven/")
+
mappingsPatch.set(layout.projectDirectory.file("build-data/mappings-patch.tiny"))
reobfMappingsPatch.set(layout.projectDirectory.file("build-data/reobf-mappings-patch.tiny"))
@@ -104,6 +89,28 @@ paperweight {
}
}
+publishing {
+ if (project.hasProperty("publishDevBundle")) {
+ publications.create<MavenPublication>("devBundle") {
+ artifact(tasks.generateDevelopmentBundle) {
+ artifactId = "dev-bundle"
+ }
+ }
+ }
+}
+
+allprojects {
+ publishing {
+ repositories {
+ maven {
+ name = "paperSnapshots"
+ url = uri("https://papermc.io/repo/repository/maven-snapshots/")
+ credentials(PasswordCredentials::class)
+ }
+ }
+ }
+}
+
tasks.register("printMinecraftVersion") {
doLast {
println(providers.gradleProperty("mcVersion").get().trim())
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 4127fc6b8..d6ffb3730 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -1,5 +1,6 @@
pluginManagement {
repositories {
+ mavenLocal()
gradlePluginPortal()
maven("https://papermc.io/repo/repository/maven-public/")
}
--
2.32.0

Datei anzeigen

@ -1,23 +1,26 @@
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription.PluginLoadOrder import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import xyz.jpenilla.runpaper.task.RunServerTask import xyz.jpenilla.runpaper.task.RunServerTask
plugins { plugins {
`java-library` `java-library`
id("net.minecrell.plugin-yml.bukkit") version "0.4.0"
id("xyz.jpenilla.run-paper") version "1.0.3"
id("io.papermc.paperweight.userdev") version "1.1.9-LOCAL-SNAPSHOT" id("io.papermc.paperweight.userdev") version "1.1.9-LOCAL-SNAPSHOT"
id("xyz.jpenilla.run-paper") version "1.0.3"
id("net.minecrell.plugin-yml.bukkit") version "0.4.0"
} }
group = "io.papermc.paperweight" group = "io.papermc.paperweight"
version = "1.0.0-SNAPSHOT" version = "1.0.0-SNAPSHOT"
repositories { repositories {
mavenLocal() {
content { includeGroup("io.papermc.paper") }
}
mavenCentral() mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/") maven("https://papermc.io/repo/repository/maven-public/")
} }
dependencies { dependencies {
paperDevBundle(files("../../temp/117/Paper/build/libs/paperDevBundle-1.17.1-R0.1-SNAPSHOT.zip")) paperweightDevBundle("1.17.1-R0.1-SNAPSHOT")
} }
runPaper { runPaper {
@ -25,18 +28,29 @@ runPaper {
} }
tasks { tasks {
compileJava { // Run reobfJar on build
options.encoding = Charsets.UTF_8.name()
options.release.set(16)
}
build { build {
dependsOn(reobfJar) dependsOn(reobfJar)
} }
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(16)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
// Task to run obfuscated/production server and plugin
runServer { runServer {
minecraftVersion("1.17.1") minecraftVersion("1.17.1")
pluginJars.from(reobfJar.flatMap { it.outputJar }) pluginJars.from(reobfJar.flatMap { it.outputJar })
} }
// Task to run mojang mapped/dev server and plugin
register<RunServerTask>("runMojangMappedServer") { register<RunServerTask>("runMojangMappedServer") {
minecraftVersion("1.17.1") minecraftVersion("1.17.1")
pluginJars.from(jar.flatMap { it.archiveFile }) pluginJars.from(jar.flatMap { it.archiveFile })
@ -45,7 +59,7 @@ tasks {
} }
bukkit { bukkit {
load = PluginLoadOrder.STARTUP load = BukkitPluginDescription.PluginLoadOrder.STARTUP
main = "io.papermc.paperweight.testplugin.TestPlugin" main = "io.papermc.paperweight.testplugin.TestPlugin"
apiVersion = "1.17" apiVersion = "1.17"
authors = listOf("Author") authors = listOf("Author")