Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update loom #205

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions develop/automatic-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ Then, we need to tell Gradle to use Fabric Loader JUnit for testing. You can do

@[code lang=groovy transcludeWith=:::automatic-testing:2](@/reference/latest/build.gradle)

#### Split Sources {#split-sources}

::: info
This section is planned to become irrelevant after the release of Loom 1.8. For more information, track [this issue](https://github.com/FabricMC/fabric-loom/issues/1060).
:::

If you are using split sources, you also need to add either the client or server source set to the test source set. Fabric Loader JUnit defaults to client, so we'll add the client source set to our testing environment with the following in `build.gradle`:

@[code lang=groovy transcludeWith=:::automatic-testing:3](@/reference/build.gradle)

### Writing Tests {#writing-tests}

Once you reload Gradle, you're now ready to write tests.
Expand Down
11 changes: 1 addition & 10 deletions reference/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT' apply false
id 'fabric-loom' version '1.8-SNAPSHOT' apply false
id "com.diffplug.spotless" version "6.23.3" apply false
id 'checkstyle'
}
Expand Down Expand Up @@ -28,15 +28,6 @@ subprojects {
}
}

// :::automatic-testing:3
sourceSets {
test {
compileClasspath += client.compileClasspath
runtimeClasspath += client.runtimeClasspath
}
}
// :::automatic-testing:3

dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

Expand Down
2 changes: 1 addition & 1 deletion reference/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

loader_version=0.15.11
loader_version=0.16.8
Binary file modified reference/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion reference/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.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion reference/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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/.
Expand Down
20 changes: 10 additions & 10 deletions reference/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
10 changes: 0 additions & 10 deletions translated/de_de/develop/automatic-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ Dann müssen wir Gradle anweisen, Fabric Loader JUnit zum Testen zu verwenden. D

@[code lang=groovy transcludeWith=:::automatic-testing:2](@/reference/latest/build.gradle)

#### Aufgeteilte Sources {#split-sources}

:::info
Es ist geplant, dass dieser Abschnitt nach der Veröffentlichung von Loom 1.8 irrelevant wird. Für mehr Informationen, folge [diesem Issue](https://github.com/FabricMC/fabric-loom/issues/1060).
:::

Wenn du geteilte Sources verwendest, musst du auch entweder den Client- oder das Server-Sourceset zum Testsourceset hinzufügen. Fabric Loader JUnit ist standardmäßig auf Client eingestellt, also fügen wir das Client-Sourceset zu unserer Testumgebung mit folgendem Eintrag in der `build.gradle`-Datei hinzu:

@[code lang=groovy transcludeWith=:::automatic-testing:3](@/reference/build.gradle)

### Tests schreiben {#writing-tests}

Nachdem du Gradle neu geladen hast, bist du bereit, Tests zu schreiben.
Expand Down
10 changes: 0 additions & 10 deletions translated/ru_ru/develop/automatic-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ authors:

@[code lang=groovy transcludeWith=:::automatic-testing:2](@/reference/latest/build.gradle)

#### Разделить источники {#split-sources}

:::info
Планируется, что этот раздел станет неактуальным после выхода Loom 1.8. Для получения дополнительной информации отслеживайте [эту проблему](https://github.com/FabricMC/fabric-loom/issues/1060).
:::

Если вы используете разделенные источники, вам также необходимо добавить либо клиентский, либо серверный набор источников в тестовый набор источников. По умолчанию Fabric Loader JUnit настроен на клиент, поэтому мы добавим исходный набор клиента в нашу тестовую среду с помощью следующего кода в `build.gradle`:

@[code lang=groovy transcludeWith=:::automatic-testing:3](@/reference/build.gradle)

### Написание тестов {#writing-tests}

После перезагрузки Gradle вы будете готовы писать тесты.
Expand Down