-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Improve source set support #17
Conversation
Allow the modding depedencies to be added to source sets that do not extend from the main source set. Also allow setting of the primary source set for runs, which also translates into that source set being set as the IntelliJ classpath module for that run.
Last commit published: 8583e166b1d303d71c812ca13daa5631c68db922. 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 #17' // https://github.com/neoforged/ModDevGradle/pull/17
url 'https://prmaven.neoforged.net/ModDevGradle/pr17'
content {
includeModule('net.neoforged', 'moddev-gradle')
includeModule('net.neoforged.moddev', 'net.neoforged.moddev.gradle.plugin')
}
}
} |
Allow the modding depedencies to be added to source sets that do not extend from the main source set. Also allow setting of the primary source set for runs, which also translates into that source set being set as the IntelliJ classpath module for that run.
src/main/java/net/neoforged/moddevgradle/internal/utils/IdeDetection.java
Outdated
Show resolved
Hide resolved
@@ -35,11 +41,16 @@ neoForge { | |||
server { | |||
server() | |||
} | |||
apitest { |
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.
Doesn't this add all of the testproject
mod to the run despite the dependency on only api
?
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.
Why?
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.
Because it adds the entire testproject
mod, which contains all of the source sets.
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.
oh that is for the folder grouping, but that's not what I cared about here.
this was about setting the right module-path for the IDE
Allow the modding depedencies to be added to source sets that do not extend from the main source set. Also allow setting of the primary source set for runs, which also translates into that source set being set as the IntelliJ classpath module for that run.
Isolated Source Sets
If you work with source sets that do not extend from
main
, and would like the modding dependencies to be availablein those source sets, you can use the following api: