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

Support project dependencies in NFRT manifests, by overriding all uses of the G:A:C #218

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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: 10 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading