Skip to content

Commit

Permalink
Support project dependencies in NFRT manifests, by overriding all use…
Browse files Browse the repository at this point in the history
…s of the G:A:C
  • Loading branch information
shartte committed Jan 2, 2025
1 parent 1a81e72 commit 01ba9fa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
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

0 comments on commit 01ba9fa

Please sign in to comment.