Merge remote-tracking branch 'FabricMC/dev/1.10' into dev/1.10

This commit is contained in:
shedaniel
2025-03-26 14:08:12 +08:00
5 changed files with 37 additions and 4 deletions

View File

@@ -1,6 +1,9 @@
name: Publish
on: workflow_dispatch
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-24.04
@@ -16,7 +19,7 @@ jobs:
# Generate the build number based on tags to allow per branch build numbers, not something github provides by default.
- name: Generate build number
id: buildnumber
uses: onyxmueller/build-tag-number@v1
uses: FabricMCBot/build-tag-number@7d8df195c4691e1681d458016f75e8bbccdb3375
with:
token: ${{ secrets.github_token }}
prefix: "build/exp/${{ github.ref }}"

View File

@@ -6,7 +6,7 @@ gson = "2.10.1"
guava = "33.0.0-jre"
stitch = "0.6.2"
tiny-remapper = "0.11.0"
tiny-remapper = "0.11.1"
access-widener = "2.1.0"
mapping-io = "0.7.1"
lorenz-tiny = "4.0.2"

View File

@@ -2,7 +2,7 @@
# Decompilers
fernflower = "2.0.0"
cfr = "0.2.2"
vineflower = "1.11.0"
vineflower = "1.11.1"
# Runtime depedencies
mixin-compile-extensions = "0.6.0"

View File

@@ -318,6 +318,9 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
Objects.requireNonNull(tinyRemapperService, "tinyRemapperService");
Objects.requireNonNull(tinyRemapper, "tinyRemapper");
// Delete the old file to prevent deleted contents from sticking around in the jar.
Files.deleteIfExists(outputFile);
try (OutputConsumerPath outputConsumer = new OutputConsumerPath.Builder(outputFile).build()) {
outputConsumer.addNonClassFiles(inputFile);
tinyRemapper.apply(outputConsumer, tinyRemapperService.getOrCreateTag(inputFile));

View File

@@ -1,7 +1,7 @@
/*
* This file is part of fabric-loom, licensed under the MIT License (MIT).
*
* Copyright (c) 2016-2021 FabricMC
* Copyright (c) 2016-2025 FabricMC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -100,4 +100,31 @@ class SimpleProjectTest extends Specification implements GradleProjectTestTrait
!result.output.contains("[WARN] [MIXIN]") // Assert that tiny remapper didnt not have any warnings when remapping
gradle.getOutputZipEntry("fabric-example-mod-1.0.0.jar", "META-INF/MANIFEST.MF").contains("Fabric-Loom-Version: 0.0.0+unknown")
}
// Tests that deleted files don't remain in built jars after a rebuild.
// See https://github.com/FabricMC/fabric-loom/issues/1270.
@Unroll
def "deleted files disappear from jars (gradle #version)"() {
// Initial conditions: a project with a resource file to delete.
setup:
def gradle = gradleProject(project: "simple", version: version)
def deletedFile = new File(gradle.projectDir, "src/main/resources/foo.txt")
deletedFile.text = "hello, world!"
gradle.run(task: "build")
when:
// Delete the resource, then run another build.
deletedFile.delete()
def result = gradle.run(task: "build")
then:
result.task(":build").outcome == SUCCESS
!gradle.hasOutputZipEntry("fabric-example-mod-1.0.0.jar", "foo.txt")
!gradle.hasOutputZipEntry("fabric-example-mod-1.0.0-sources.jar", "foo.txt")
!gradle.hasOutputZipEntry("fabric-example-mod-1.0.0-no-remap.jar", "foo.txt")
!gradle.hasOutputZipEntry("fabric-example-mod-1.0.0-no-remap-sources.jar", "foo.txt")
where:
version << STANDARD_TEST_VERSIONS
}
}