Skip to content

Commit

Permalink
Update dependencies (FabricMC#1089)
Browse files Browse the repository at this point in the history
* Update depedencies

* Fix Gradle 9 deprecation warning

* No need for the shadow jar plugin
  • Loading branch information
modmuss50 authored Apr 15, 2024
1 parent befebfb commit b8da4e5
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [8.6.0-jdk17]
version: [8.7.0-jdk17]
runs-on: ubuntu-22.04
container:
image: gradle:${{ matrix.version }}
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:

runs-on: ubuntu-22.04
container:
image: gradle:8.6.0-jdk17
image: gradle:8.7.0-jdk17
options: --user root

steps:
Expand All @@ -58,7 +58,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [8.6.0-jdk17]
version: [8.7.0-jdk17]
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}

runs-on: ubuntu-22.04
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@SuppressWarnings("unused")
public class LoomGradlePluginBootstrap implements Plugin<PluginAware> {
private static final String MIN_SUPPORTED_GRADLE_VERSION = "8.6";
private static final String MIN_SUPPORTED_GRADLE_VERSION = "8.7";
private static final int MIN_SUPPORTED_MAJOR_JAVA_VERSION = 17;
private static final int MIN_SUPPORTED_MAJOR_IDEA_VERSION = 2021;

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
kotlin = "1.9.20"
kotlin = "1.9.22"
asm = "9.6"
commons-io = "2.15.1"
gson = "2.10.1"
Expand Down
2 changes: 1 addition & 1 deletion gradle/runtime.libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Decompilers
fernflower = "2.0.0"
cfr = "0.2.2"
vineflower = "1.9.3"
vineflower = "1.10.0"

# Runtime depedencies
mixin-compile-extensions = "0.6.0"
Expand Down
12 changes: 6 additions & 6 deletions gradle/test.libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[versions]
spock = "2.3-groovy-3.0"
junit = "5.10.2"
javalin = "6.1.0"
mockito = "5.10.0"
java-debug = "0.51.0"
javalin = "6.1.3"
mockito = "5.11.0"
java-debug = "0.52.0"
mixin = "0.12.5+mixin.0.8.5"

gradle-nightly = "8.8-20240224001421+0000"
fabric-loader = "0.15.6"
fabric-installer = "1.0.0"
gradle-nightly = "8.9-20240413002319+0000"
fabric-loader = "0.15.9"
fabric-installer = "1.0.1"

[libraries]
spock = { module = "org.spockframework:spock-core", version.ref = "spock" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ 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
case $MAX_FD in #(
'' | 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
Expand Down Expand Up @@ -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" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import org.gradle.api.artifacts.DependencySet;
import org.gradle.api.artifacts.FileCollectionDependency;
import org.gradle.api.artifacts.ResolvedDependency;
import org.gradle.api.artifacts.component.ComponentIdentifier;
import org.gradle.api.artifacts.component.ModuleComponentIdentifier;

import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.util.gradle.SelfResolvingDependencyUtils;
Expand Down Expand Up @@ -104,8 +106,21 @@ public Configuration getSourceConfiguration() {
return sourceConfiguration;
}

private boolean matches(ComponentIdentifier identifier) {
if (identifier instanceof ModuleComponentIdentifier moduleComponentIdentifier) {
return moduleComponentIdentifier.getGroup().equals(dependency.getGroup())
&& moduleComponentIdentifier.getModule().equals(dependency.getName())
&& moduleComponentIdentifier.getVersion().equals(dependency.getVersion());
}

return false;
}

public Set<File> resolve() {
return sourceConfiguration.files(dependency);
return sourceConfiguration.getIncoming()
.artifactView(view -> view.componentFilter(this::matches))
.getFiles()
.getFiles();
}

public Optional<File> resolveFile() {
Expand Down
4 changes: 1 addition & 3 deletions src/test/resources/projects/mixinApAutoRefmap/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'fabric-loom'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'maven-publish'
}

Expand Down Expand Up @@ -83,9 +82,8 @@ loom {
}
}

shadowJar {
task shadowJar(type: Jar) {
archiveClassifier.set("universal-dev")
configurations = []

from(sourceSets["main"].output)
from(sourceSets["mixin"].output)
Expand Down

0 comments on commit b8da4e5

Please sign in to comment.