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

Add dynamic version support #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add dynamic version support #55

wants to merge 1 commit into from

Conversation

shartte
Copy link
Collaborator

@shartte shartte commented Jan 2, 2025

  1. It will first try to find the dynamic version in the artifact manifest
  2. If that fails, it gathers all available versions from across all repositories (uncached) and then substitutes the best matching version

@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jan 2, 2025

  • Publish PR to GitHub Packages

Last commit published: 52d8308547e04253cdf8cf88dbe274352bfa4f35.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #55' // https://github.com/neoforged/NeoFormRuntime/pull/55
        url 'https://prmaven.neoforged.net/NeoFormRuntime/pr55'
        content {
            includeModule('net.neoforged', 'neoform-runtime')
        }
    }
}

var finalLocation = artifactsCache.resolve(mavenCoordinate.toRelativeRepositoryPath());

// Special case: NeoForge reference libraries that are only available via the Mojang download server
if (mavenCoordinate.groupId().equals("com.mojang") && mavenCoordinate.artifactId().equals("logging")) {
if (mavenCoordinate.groupId().equals("com.mojang") && mavenCoordinate.artifactId().equals("logging")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm being pedantic but I would surround the ands in their own parenthesis for clarity's sake

// See if it's a dynamic version and match against all entries
if (artifactCoordinate.isDynamicVersion()) {
for (var entry : externallyProvided.entrySet()) {
if (artifactCoordinate.matchesVersion(entry.getKey().version())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this check should be matches artifact first and version second

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants