mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-01 21:17:46 -05:00
Merge 1.7, part 4
This commit is contained in:
10
.github/workflows/publish-exp.yml
vendored
10
.github/workflows/publish-exp.yml
vendored
@@ -6,11 +6,13 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: eclipse-temurin:17-jdk
|
||||
options: --user root
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: setup jdk
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: 'temurin'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gradle/wrapper-validation-action@v2
|
||||
|
||||
|
||||
16
.github/workflows/publish.yml
vendored
16
.github/workflows/publish.yml
vendored
@@ -1,5 +1,4 @@
|
||||
name: Java CI
|
||||
|
||||
name: Publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -20,16 +19,15 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: setup jdk
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: 'temurin'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gradle/wrapper-validation-action@v2
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 17
|
||||
- name: Upload to Maven
|
||||
run: ./gradlew publish --stacktrace
|
||||
env:
|
||||
|
||||
50
.github/workflows/test-push.yml
vendored
50
.github/workflows/test-push.yml
vendored
@@ -7,18 +7,16 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [8.7.0-jdk17]
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: gradle:${{ matrix.version }}
|
||||
options: --user root
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: setup jdk
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: 'temurin'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gradle/wrapper-validation-action@v2
|
||||
- run: gradle build check -x test --stacktrace --warning-mode fail
|
||||
- run: ./gradlew build check -x test --stacktrace --warning-mode fail
|
||||
- uses: Juuxel/publish-checkstyle-report@v1
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
@@ -32,7 +30,7 @@ jobs:
|
||||
- name: setup jdk
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
java-version: 21
|
||||
distribution: 'temurin'
|
||||
- uses: gradle/wrapper-validation-action@v2
|
||||
- run: ./gradlew build check -x test --stacktrace --warning-mode fail
|
||||
@@ -42,14 +40,16 @@ jobs:
|
||||
# Lets wait to ensure it builds before going running tests
|
||||
needs: build
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: gradle:8.7.0-jdk17
|
||||
options: --user root
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: setup jdk
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: 'temurin'
|
||||
- uses: actions/checkout@v4
|
||||
- run: gradle writeActionsTestMatrix --stacktrace --warning-mode fail
|
||||
- run: ./gradlew writeActionsTestMatrix --stacktrace --warning-mode fail
|
||||
-
|
||||
id: set-matrix
|
||||
run: echo "matrix=$(cat build/test_matrix.json)" >> $GITHUB_OUTPUT
|
||||
@@ -63,17 +63,18 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [8.7.0-jdk17]
|
||||
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: gradle:${{ matrix.version }}
|
||||
options: --user root
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: gradle printActionsTestName --name="${{ matrix.test }}" test --tests ${{ matrix.test }} --stacktrace --warning-mode fail
|
||||
- name: setup jdk
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: 'temurin'
|
||||
- run: ./gradlew printActionsTestName --name="${{ matrix.test }}" test --tests ${{ matrix.test }} --stacktrace --warning-mode fail
|
||||
env:
|
||||
TEST_WARNING_MODE: fail
|
||||
id: test
|
||||
@@ -95,17 +96,16 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java: [17]
|
||||
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}
|
||||
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: setup jdk ${{ matrix.java }}
|
||||
- name: setup jdk
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
java-version: 21
|
||||
distribution: 'temurin'
|
||||
- run: ./gradlew printActionsTestName --name="${{ matrix.test }}" test --tests ${{ matrix.test }} --stacktrace --warning-mode fail
|
||||
env:
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java: [ 17, 21 ]
|
||||
os: [ windows-2022, ubuntu-22.04, macos-14 ]
|
||||
os: [ windows-2022, ubuntu-24.04, macos-14 ]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.gradle.util.GradleVersion;
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class LoomGradlePluginBootstrap implements Plugin<PluginAware> {
|
||||
private static final String MIN_SUPPORTED_GRADLE_VERSION = "8.7";
|
||||
private static final String MIN_SUPPORTED_GRADLE_VERSION = "8.8";
|
||||
private static final int MIN_SUPPORTED_MAJOR_JAVA_VERSION = 17;
|
||||
private static final int MIN_SUPPORTED_MAJOR_IDEA_VERSION = 2021;
|
||||
|
||||
|
||||
18
build.gradle
18
build.gradle
@@ -91,11 +91,17 @@ configurations {
|
||||
testRuntimeClasspath.extendsFrom bootstrap
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
configurations.configureEach {
|
||||
resolutionStrategy {
|
||||
// I am sorry, for now
|
||||
// failOnNonReproducibleResolution()
|
||||
}
|
||||
|
||||
if (canBeConsumed) {
|
||||
attributes {
|
||||
attribute(GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, objects.named(GradlePluginApiVersion, GradleVersion.current().getVersion()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -383,7 +389,7 @@ publishing {
|
||||
}
|
||||
|
||||
// Need to tweak this file to pretend we are compatible with j8 so the bootstrap will run.
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
tasks.withType(GenerateModuleMetadata).configureEach {
|
||||
doLast {
|
||||
def file = outputFile.get().asFile
|
||||
|
||||
@@ -398,7 +404,7 @@ tasks.withType(GenerateModuleMetadata) {
|
||||
}
|
||||
|
||||
// A task to output a json file with a list of all the test to run
|
||||
task writeActionsTestMatrix() {
|
||||
tasks.register('writeActionsTestMatrix') {
|
||||
doLast {
|
||||
def testMatrix = []
|
||||
file('src/test/groovy/net/fabricmc/loom/test/integration').traverse {
|
||||
@@ -445,7 +451,7 @@ tasks.named('wrapper') {
|
||||
/**
|
||||
* Run this task to download the gradle sources next to the api jar, you may need to manually attach the sources jar
|
||||
*/
|
||||
task downloadGradleSources() {
|
||||
tasks.register('downloadGradleSources') {
|
||||
doLast {
|
||||
// Awful hack to find the gradle api location
|
||||
def gradleApiFile = project.configurations.detachedConfiguration(dependencies.gradleApi()).files.stream()
|
||||
@@ -467,13 +473,13 @@ tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
task printActionsTestName(type: PrintActionsTestName) {
|
||||
tasks.register('printActionsTestName', PrintActionsTestName) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces invalid characters in test names for GitHub Actions artifacts.
|
||||
*/
|
||||
class PrintActionsTestName extends DefaultTask {
|
||||
abstract class PrintActionsTestName extends DefaultTask {
|
||||
@Input
|
||||
@Option(option = "name", description = "The test name")
|
||||
String testName
|
||||
|
||||
@@ -17,9 +17,8 @@ loom-native = "0.2.0"
|
||||
# Plugins
|
||||
spotless = "6.25.0"
|
||||
test-retry = "1.5.6"
|
||||
checkstyle = "10.13.0"
|
||||
checkstyle = "10.17.0"
|
||||
codenarc = "3.4.0"
|
||||
jacoco = "0.8.11"
|
||||
|
||||
# Forge libraries
|
||||
forge-installer-tools = "1.2.0"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[versions]
|
||||
spock = "2.3-groovy-3.0"
|
||||
junit = "5.10.2"
|
||||
javalin = "6.1.3"
|
||||
mockito = "5.11.0"
|
||||
javalin = "6.1.6"
|
||||
mockito = "5.12.0"
|
||||
java-debug = "0.52.0"
|
||||
mixin = "0.12.5+mixin.0.8.5"
|
||||
|
||||
gradle-nightly = "8.9-20240505002558+0000"
|
||||
fabric-loader = "0.15.10"
|
||||
gradle-nightly = "8.10-20240613003017+0000"
|
||||
fabric-loader = "0.15.11"
|
||||
fabric-installer = "1.0.1"
|
||||
|
||||
[libraries]
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
2
gradlew
vendored
2
gradlew
vendored
@@ -55,7 +55,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
@@ -40,7 +40,7 @@ public abstract class LoomProblemReporter {
|
||||
|
||||
public void reportSelfResolvingDependencyUsage() {
|
||||
problemReporter.reporting(spec -> spec
|
||||
.label("SelfResolvingDependency is deprecated")
|
||||
.id("loom-deprecated-selfresolvingdependency", "SelfResolvingDependency is deprecated")
|
||||
.details("SelfResolvingDependency has been deprecated for removal in Gradle 9")
|
||||
.solution("Please replace usages of SelfResolvingDependency")
|
||||
.documentedAt("https://github.com/gradle/gradle/pull/27420")
|
||||
|
||||
@@ -59,8 +59,13 @@ public class WorkerDaemonClientsManagerHelper {
|
||||
return Collections.emptyList();
|
||||
};
|
||||
|
||||
//noinspection unchecked
|
||||
manager.selectIdleClientsToStop((Transformer) transformer);
|
||||
try {
|
||||
Method selectIdleClientsToStop = manager.getClass().getDeclaredMethod("selectIdleClientsToStop", Transformer.class);
|
||||
selectIdleClientsToStop.setAccessible(true);
|
||||
selectIdleClientsToStop.invoke(manager, transformer);
|
||||
} catch (InvocationTargetException | NoSuchMethodException | IllegalAccessException e) {
|
||||
throw new RuntimeException("Failed to selectIdleClientsToStop", e);
|
||||
}
|
||||
|
||||
return stopped.get();
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class FabricAPITest extends Specification implements GradleProjectTestTrait {
|
||||
setup:
|
||||
def gradle = gradleProject(
|
||||
repo: "https://github.com/FabricMC/fabric.git",
|
||||
commit: "efa5891941a32589207dc58c2e77183d599465b8",
|
||||
commit: "41bc64cd617f03d49ecc4a4f7788cb65d465415c",
|
||||
version: version,
|
||||
patch: "fabric_api"
|
||||
)
|
||||
@@ -62,10 +62,10 @@ class FabricAPITest extends Specification implements GradleProjectTestTrait {
|
||||
|
||||
// Change the plugin used
|
||||
gradle.buildGradle.text = gradle.buildGradle.text
|
||||
.replace('id "fabric-loom" version "1.4.1"', 'id "dev.architectury.loom"')
|
||||
.replace('id "fabric-loom" version "1.6.11"', 'id "dev.architectury.loom"')
|
||||
.replace('"fabric-loom"', '"dev.architectury.loom"') + mixinApPatch
|
||||
|
||||
def minecraftVersion = "23w51b"
|
||||
def minecraftVersion = "1.21"
|
||||
def server = ServerRunner.create(gradle.projectDir, minecraftVersion)
|
||||
.withMod(gradle.getOutputFile("fabric-api-999.0.0.jar"))
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.nio.file.Path
|
||||
import java.util.concurrent.CompletableFuture
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.cache.FileLockManager
|
||||
@@ -39,6 +38,7 @@ import org.gradle.internal.nativeintegration.services.NativeServices
|
||||
import org.gradle.internal.remote.internal.inet.InetAddressFactory
|
||||
import org.gradle.internal.service.ServiceRegistry
|
||||
import org.gradle.invocation.DefaultGradle
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
import org.gradle.launcher.daemon.configuration.DaemonParameters
|
||||
import org.gradle.launcher.daemon.context.DefaultDaemonContext
|
||||
import org.gradle.launcher.daemon.protocol.DaemonMessageSerializer
|
||||
@@ -109,7 +109,7 @@ class TestPlugin implements Plugin<Project> {
|
||||
return new DefaultDaemonContext(
|
||||
UUID.randomUUID().toString(),
|
||||
new File("."),
|
||||
JavaVersion.current(),
|
||||
JavaLanguageVersion.current(),
|
||||
new File("."),
|
||||
ProcessHandle.current().pid(),
|
||||
0,
|
||||
|
||||
@@ -29,6 +29,7 @@ import groovy.transform.Immutable
|
||||
import org.apache.commons.io.FileUtils
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.gradle.testkit.runner.GradleRunner
|
||||
import org.gradle.util.GradleVersion
|
||||
import spock.lang.Shared
|
||||
|
||||
import net.fabricmc.loom.test.LoomTestConstants
|
||||
@@ -201,7 +202,8 @@ trait GradleProjectTestTrait {
|
||||
.withPluginClasspath()
|
||||
.withGradleVersion(gradleVersion)
|
||||
.forwardOutput()
|
||||
.withDebug(enableDebugging)
|
||||
// Only enable debugging when the current gradle version matches the version we are testing
|
||||
.withDebug(enableDebugging && gradleVersion == GradleVersion.current().getVersion())
|
||||
}
|
||||
|
||||
File getProjectDir() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
diff --git a/build.gradle b/build.gradle
|
||||
--- a/build.gradle (revision 23e8616e7457d7d4a65119b93952d134607ffc5c)
|
||||
+++ b/build.gradle (date 1699535194191)
|
||||
--- a/build.gradle (revision 41bc64cd617f03d49ecc4a4f7788cb65d465415c)
|
||||
+++ b/build.gradle (date 1718312645477)
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
def ENV = System.getenv()
|
||||
@@ -9,8 +9,8 @@ diff --git a/build.gradle b/build.gradle
|
||||
+version = "999.0.0"
|
||||
logger.lifecycle("Building Fabric: " + version)
|
||||
|
||||
|
||||
@@ -22,24 +22,7 @@
|
||||
def metaProjects = [
|
||||
@@ -34,24 +34,7 @@
|
||||
import org.apache.commons.codec.digest.DigestUtils
|
||||
|
||||
def getSubprojectVersion(project) {
|
||||
|
||||
@@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.16.5
|
||||
yarn_mappings=1.16.5+build.6
|
||||
loader_version=0.11.3
|
||||
minecraft_version=1.20.4
|
||||
yarn_mappings=1.20.4+build.3
|
||||
loader_version=0.15.11
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.0
|
||||
|
||||
@@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.16.5
|
||||
yarn_mappings=1.16.5+build.6
|
||||
loader_version=0.11.3
|
||||
minecraft_version=1.20.4
|
||||
yarn_mappings=1.20.4+build.3
|
||||
loader_version=0.15.11
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.0
|
||||
|
||||
@@ -44,7 +44,7 @@ version = "1.0.0"
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:1.18.1"
|
||||
mappings "net.fabricmc:yarn:1.18.1+build.12:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.12.12"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.15.11"
|
||||
}
|
||||
|
||||
base {
|
||||
|
||||
Reference in New Issue
Block a user