From 01ba9faf51e5b03eeb6b432cefd6661fbd84f18b Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Thu, 2 Jan 2025 14:28:13 +0100 Subject: [PATCH 1/2] Support project dependencies in NFRT manifests, by overriding all uses of the G:A:C --- .../moddevgradle/internal/utils/DependencyUtils.java | 9 +++++++-- .../net/neoforged/nfrtgradle/ArtifactManifestEntry.java | 2 +- .../neoforged/nfrtgradle/NeoFormRuntimeExtension.java | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/neoforged/moddevgradle/internal/utils/DependencyUtils.java b/src/main/java/net/neoforged/moddevgradle/internal/utils/DependencyUtils.java index 44231e9..e55dc88 100644 --- a/src/main/java/net/neoforged/moddevgradle/internal/utils/DependencyUtils.java +++ b/src/main/java/net/neoforged/moddevgradle/internal/utils/DependencyUtils.java @@ -11,7 +11,7 @@ private DependencyUtils() {} /** * Given a resolved artifact, try to guess which Maven GAV it was resolved from. */ - public static String guessMavenGav(ResolvedArtifactResult result) { + public static String guessMavenGav(ResolvedArtifactResult result, boolean useWildcardVersionForProjectRefs) { String artifactId; String ext = ""; String classifier = null; @@ -40,7 +40,12 @@ public static String guessMavenGav(ResolvedArtifactResult result) { var capabilities = result.getVariant().getCapabilities(); if (capabilities.size() == 1) { var capability = capabilities.get(0); - artifactId = capability.getGroup() + ":" + capability.getName() + ":" + capability.getVersion(); + artifactId = capability.getGroup() + ":" + capability.getName() + ":"; + if (useWildcardVersionForProjectRefs) { + artifactId += "*"; + } else { + artifactId += capability.getVersion(); + } } else { artifactId = result.getId().getComponentIdentifier().toString(); } diff --git a/src/main/java/net/neoforged/nfrtgradle/ArtifactManifestEntry.java b/src/main/java/net/neoforged/nfrtgradle/ArtifactManifestEntry.java index cf3f635..277b86b 100644 --- a/src/main/java/net/neoforged/nfrtgradle/ArtifactManifestEntry.java +++ b/src/main/java/net/neoforged/nfrtgradle/ArtifactManifestEntry.java @@ -20,7 +20,7 @@ final class ArtifactManifestEntry implements Serializable { private final File file; ArtifactManifestEntry(ResolvedArtifactResult artifactResult) { - this.artifactId = DependencyUtils.guessMavenGav(artifactResult); + this.artifactId = DependencyUtils.guessMavenGav(artifactResult, true); this.file = artifactResult.getFile(); } diff --git a/src/main/java/net/neoforged/nfrtgradle/NeoFormRuntimeExtension.java b/src/main/java/net/neoforged/nfrtgradle/NeoFormRuntimeExtension.java index 3b277fb..ee09ec1 100644 --- a/src/main/java/net/neoforged/nfrtgradle/NeoFormRuntimeExtension.java +++ b/src/main/java/net/neoforged/nfrtgradle/NeoFormRuntimeExtension.java @@ -12,7 +12,7 @@ public abstract class NeoFormRuntimeExtension { public static final String NAME = "neoFormRuntime"; - private static final String DEFAULT_NFRT_VERSION = "1.0.13"; + private static final String DEFAULT_NFRT_VERSION = "1.0.17"; @Inject public NeoFormRuntimeExtension(Project project) { From 73205244e963bab16b97c00fc4693921c8c29a44 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Thu, 2 Jan 2025 15:34:32 +0200 Subject: [PATCH 2/2] Do not run renovate for cursemaven or jei deps --- .github/renovate.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/renovate.json b/.github/renovate.json index 24daaac..7c6ba45 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -4,6 +4,16 @@ "github>neoforged/actions:renovate_preset" ], "baseBranches": ["main", "/^\\d+\\.x/"], + "packageRules": [ + { + "matchDatasources": ["maven"], + "matchPackagePatterns": [ + "^curse\\.maven(\\.|:)", + "^mezz\\.jei(\\.|:)" + ], + "enabled": false + } + ], "customManagers": [ { "customType": "regex",