-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 local file dependencies in Jar-in-Jar #94
base: main
Are you sure you want to change the base?
Conversation
Last commit published: 06cf6a7e4ded7967ebbd43044edf5fd9dd502d3f. 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 #94' // https://github.com/neoforged/ModDevGradle/pull/94
url 'https://prmaven.neoforged.net/ModDevGradle/pr94'
content {
includeModule('net.neoforged.moddev', 'net.neoforged.moddev.gradle.plugin')
includeModule('net.neoforged.moddev.repositories', 'net.neoforged.moddev.repositories.gradle.plugin')
includeModule('net.neoforged', 'moddev-gradle')
}
}
} |
i am unconvinced that baking a bunch of resolution into the artifact ID in the jarJar metadata -- locking the included jar from being used in version resolution too, generally speaking -- is the correct solution here. Namely, I have two worries:
If the real worry is feature variants to expose a single file to then re-include being too complicated -- have we considered just making a small DSL to make that much easier? For instance, |
That will work since the have the same filename and hash value.
The average modder has no idea what those are. Sodium is doing that and it might as well be hyroglyphs to anyone reading it.
Because it is by far the most common use-case for this, and we already support cross-project dependencies using |
@lukebemish I'll go back and actually use a different approach, however: For externally sourced dependencies (from Central), the uniqueness of the JPMS module name and the (group, artifactId) tuple usually correlates, but for locally built files that can not be assumed as readily. As such, I think we should actually determine the JPMS module name when a local file is embedded and use that as the artifactId, as it will allow JIJ to detect the real conflict that would otherwise occur later and produce much better error messages. |
Idea: if the local thing declares a module version in addition to a module name, can we use that as the version for jarJar? And/or otherwise default to |
0a248b3
to
7a2f1f5
Compare
7a2f1f5
to
ce7e09d
Compare
83fe40c
to
948c588
Compare
@shartte, this pull request has conflicts, please resolve them for this PR to move forward. |
d51a7f0
to
5558472
Compare
@shartte, this pull request has conflicts, please resolve them for this PR to move forward. |
0a74782
to
0940b12
Compare
06cf6a7
to
df9784f
Compare
This allows a much cleaner and simpler structure for including service-jars (i.e. core mods) based on including a secondary source set.
We use the filename as the artifact id, and its MD5 hash as the file version.
This means two embedded local-file libraries of the same filename are compared using their content hash.
If someone embeds a library via GAV and another embeds the same library as a local file, this fails.
This is intended only for locally built source sets, and not for including local copies of Maven libraries.