Update buildscript

This commit is contained in:
modmuss50 2024-02-07 23:08:02 +00:00
parent eafbb88a09
commit ac7bd167b7
10 changed files with 48 additions and 46 deletions

View File

@ -4,18 +4,18 @@ jobs:
build:
strategy:
matrix:
java: [17-jdk, 20-jdk]
java: [17-jdk, 21-jdk]
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./gradlew build javadocJar checkMappings --stacktrace --warning-mode fail
- name: Build artifacts
if: ${{ matrix.java == '20-jdk' }}
if: ${{ matrix.java == '21-jdk' }}
continue-on-error: true
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
@ -23,9 +23,9 @@ jobs:
test-build-logic:
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:20-jdk
image: eclipse-temurin:21-jdk
options: --user root
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew :filament:build

View File

@ -6,10 +6,10 @@ jobs:
if: ${{ github.repository_owner == 'FabricMC' }}
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:20-jdk
image: eclipse-temurin:21-jdk
options: --user root
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# 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

View File

@ -4,10 +4,10 @@ jobs:
build:
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:20-jdk
image: eclipse-temurin:21-jdk
options: --user root
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./gradlew :filament:build :filament:publish --stacktrace --no-configuration-cache
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}

View File

@ -109,6 +109,8 @@ import net.fabricmc.filament.task.mappingio.MergeMappingsTask
import net.fabricmc.mappingio.format.MappingFormat
import net.fabricmc.nameproposal.MappingNameCompleter
import org.gradle.work.DisableCachingByDefault
import com.diffplug.spotless.LineEnding
import groovy.xml.XmlSlurper
import java.util.zip.GZIPOutputStream
@ -186,7 +188,7 @@ tasks.register('mapSpecializedMethods', MapSpecializedMethodsTask) {
tasks.register('convertToV1', ConvertMappingsTask) {
input = mapSpecializedMethods.output
output = new File(tempDir, "yarn-mappings.tiny")
outputFormat = MappingFormat.TINY
outputFormat = MappingFormat.TINY_FILE
}
tasks.register('mergeTiny', MergeMappingsTask) {
@ -194,7 +196,7 @@ tasks.register('mergeTiny', MergeMappingsTask) {
output = new File(tempDir, "mappings.tiny")
mappingInputs.from downloadIntermediary.output
mappingInputs.from convertToV1.output
outputFormat = MappingFormat.TINY
outputFormat = MappingFormat.TINY_FILE
}
// Disable the default jar task
@ -281,7 +283,7 @@ tasks.withType(AbstractArchiveTask).configureEach {
}
spotless {
lineEndings = com.diffplug.spotless.LineEnding.UNIX
lineEndings = LineEnding.UNIX
java {
licenseHeaderFile(rootProject.file("HEADER"))
@ -347,7 +349,7 @@ tasks.register('mergeV2', MergeMappingsTask) {
output = new File(tempDir, "merged-v2.tiny")
mappingInputs.from downloadIntermediary.output
mappingInputs.from insertAutoGeneratedEnumMappings.output
outputFormat = MappingFormat.TINY_2
outputFormat = MappingFormat.TINY_2_FILE
}
tasks.register('v2UnmergedYarnJar', Jar) {
@ -510,8 +512,8 @@ javadoc {
source fileTree(fakeSourceDir) + sourceSets.constants.allJava + sourceSets.packageDocs.allJava
classpath = configurations.javadocClasspath.plus minecraftLibraries
def fs = services.get(FileSystemOperations.class)
def outputDir = javadoc.outputDirectory
def fs = project.services.get(FileSystemOperations.class)
def outputDir = javadoc.destinationDir
doLast {
fs.copy {
@ -558,7 +560,7 @@ check.dependsOn javadocLint
publishing {
publications {
maven(MavenPublication) {
register("maven", MavenPublication) {
groupId 'net.fabricmc'
artifactId "yarn"
version yarnVersion

View File

@ -38,10 +38,10 @@ dependencies {
implementation "net.fabricmc:tiny-remapper:$properties.tiny_remapper_version"
implementation "net.fabricmc:mappingpoet:$properties.mappingpoet_version"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4.2'
implementation 'net.fabricmc:mapping-io:0.4.0'
implementation 'net.fabricmc:mapping-io:0.5.1'
// Contains a number of useful utilities we can re-use.
implementation ("net.fabricmc:fabric-loom:1.2.7") {
implementation ("net.fabricmc:fabric-loom:1.5.7") {
transitive = false
}
@ -61,7 +61,7 @@ test {
checkstyle {
configFile = file('checkstyle.xml')
toolVersion = '10.3.3'
toolVersion = '10.13.0'
}
gradlePlugin {
@ -91,7 +91,7 @@ publishing {
/**
* 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()

View File

@ -6,15 +6,15 @@ org.gradle.configuration-cache=true
enigma_version=2.3.3
unpick_version=2.3.0
cfr_version=0.2.1
name_proposal_version=0.1.5
asm_version=9.5
name_proposal_version=0.2.0
asm_version=9.6
# Javadoc generation/linking
fabric_loader_version=0.14.25
jetbrains_annotations_version=23.0.0
fabric_loader_version=0.15.6
jetbrains_annotations_version=24.1.0
mappingpoet_version=0.3.2
# Build logic
tiny_remapper_version=0.8.5
junit_version=5.7.1
assertj_version=3.19.0
tiny_remapper_version=0.10.1
junit_version=5.10.2
assertj_version=3.25.3

Binary file not shown.

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

14
gradlew vendored
View File

@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \

20
gradlew.bat vendored
View File

@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail