-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add dynamic version support #55
base: main
Are you sure you want to change the base?
Conversation
shartte
commented
Jan 2, 2025
- It will first try to find the dynamic version in the artifact manifest
- If that fails, it gathers all available versions from across all repositories (uncached) and then substitutes the best matching version
Last commit published: 52d8308547e04253cdf8cf88dbe274352bfa4f35. 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 #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") |
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'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()) |
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 think this check should be matches artifact first and version second