-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Redownload Assets if the referenced asset files have gone missing #233
Conversation
Last commit published: cf197703d43c5c2364bbd2eae4d2ed708bbfe044. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #233' // https://github.com/neoforged/ModDevGradle/pull/233
url 'https://prmaven.neoforged.net/ModDevGradle/pr233'
content {
includeModule('net.neoforged.moddev.legacyforge', 'net.neoforged.moddev.legacyforge.gradle.plugin')
includeModule('net.neoforged.moddev', 'net.neoforged.moddev.gradle.plugin')
includeModule('net.neoforged.moddev.repositories', 'net.neoforged.moddev.repositories.gradle.plugin')
includeModule('net.neoforged', 'moddev-gradle')
}
}
} |
import java.io.UncheckedIOException; | ||
import java.util.Properties; | ||
|
||
public record DownloadedAssetReference(String assetIndex, String assetsRoot) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call it DownloadedAssetsReference
maybe. Singular refers to a single asset. Or maybe simply AssetProperties
. Note that this record is now being made public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also a JSON format which is why I did t go for it. But Yeah it belongs to the NFRT tasks and MDG need to use it so Api it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I just think DownloadedAssetReference
is a bad name.)
Yes I will make it plural at least
Bruno Ploumhans ***@***.***> schrieb am Mi., 5. Feb. 2025,
10:29:
… ***@***.**** commented on this pull request.
------------------------------
In src/main/java/net/neoforged/nfrtgradle/DownloadedAssetReference.java
<#233 (comment)>
:
> @@ -0,0 +1,29 @@
+package net.neoforged.nfrtgradle;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.util.Properties;
+
+public record DownloadedAssetReference(String assetIndex, String assetsRoot) {
(I just think DownloadedAssetReference is a bad name.)
—
Reply to this email directly, view it on GitHub
<#233 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJT6V5EJYBBEVPDBEGNHPL2OHKXTAVCNFSM6AAAAABWPZKCIOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKOJVGEYDCMBSHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
c9b40c9
to
cf19770
Compare
🚀 This PR has been released as ModDevGradle version |
When the gradle cache is deleted (or whereever the assets are); but the project directory is not, MDG will not re-download the assets since it doesn't know they've gone missing.
This code adds an up-to-date check to the DownloadAssets task that validates if the assets directory still exists.