Update paperweight + userdev bundle. (#1930)

* Update paperweight + userdev bundle.

* remove unneeded config (set by userdev plugin already)
This commit is contained in:
wizjany 2021-11-11 15:05:43 -05:00 committed by GitHub
parent 9928bc85b0
commit bd87665e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 22 deletions

View File

@ -52,5 +52,5 @@
implementation("net.fabricmc:fabric-loom:$loomVersion")
implementation("net.fabricmc:sponge-mixin:$mixinVersion")
implementation("org.enginehub.gradle:gradle-codecov-plugin:0.1.0")
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.1.11")
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.1.14")
}

View File

@ -1,24 +1,11 @@
import io.papermc.paperweight.util.constants.REOBF_CONFIG
import org.gradle.api.Named
import io.papermc.paperweight.userdev.attribute.Obfuscation
import org.gradle.api.Project
import org.gradle.api.attributes.Attribute
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.named
// TODO https://github.com/PaperMC/paperweight/pull/87
interface Obfuscation : Named {
companion object {
val OBFUSCATION_ATTRIBUTE = Attribute.of(
"org.enginehub.obfuscation",
Obfuscation::class.java
)
const val NONE = "none"
const val REOBFUSCATED = "reobfuscated"
}
}
// For specific version pinning, see
// https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
fun Project.applyPaperweightAdapterConfiguration(
@ -40,8 +27,4 @@ interface Obfuscation : Named {
tasks.named("assemble") {
dependsOn("reobfJar")
}
configurations[REOBF_CONFIG].attributes {
attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.REOBFUSCATED))
}
}

View File

@ -1,3 +1,3 @@
applyPaperweightAdapterConfiguration(
"1.17.1-R0.1-20211001.111503-102"
"1.17.1-R0.1-20211109.085555-183"
)

View File

@ -600,7 +600,7 @@ private void doRegen(org.bukkit.World bukkitWorld, Region region, Extent extent,
Path tempDir = Files.createTempDirectory("WorldEditWorldGen");
LevelStorageSource levelStorage = LevelStorageSource.createDefault(tempDir);
ResourceKey<LevelStem> worldDimKey = getWorldDimKey(env);
try (LevelStorageSource.LevelStorageAccess session = levelStorage.c("worldeditregentempworld", worldDimKey)) {
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("worldeditregentempworld", worldDimKey)) {
ServerLevel originalWorld = ((CraftWorld) bukkitWorld).getHandle();
PrimaryLevelData levelProperties = (PrimaryLevelData) originalWorld.getServer()
.getWorldData().overworldData();

View File

@ -1,4 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import io.papermc.paperweight.userdev.attribute.Obfuscation
plugins {
`java-library`
@ -32,7 +33,7 @@
isCanBeResolved = true
shouldResolveConsistentlyWith(configurations["runtimeClasspath"])
attributes {
attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.REOBFUSCATED))
attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.OBFUSCATED))
}
}