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 available
in those source sets, you can use the following api:
sourceSets {
anotherSourceSet // example
}
neoForge {
// ...
addModdingDependenciesTo(sourceSets.anotherSourceSet)
mods {
mymod {
sourceSet sourceSets.main
// Do not forget to add additional soruce-sets here!
sourceSet sourceSets.anotherSourceSet
}
}
}
dependencies {
implementation sourceSets.anotherSourceSet.output
}
PR Publishing
### The artifacts published by this PR:
- :package: [`net.neoforged:moddev-gradle:0.1.83-pr-17-better-source-set-support`](https://github.com/neoforged/ModDevGradle/packages/2178108)
- :package: [`net.neoforged.moddev:net.neoforged.moddev.gradle.plugin:0.1.83-pr-17-better-source-set-support`](https://github.com/neoforged/ModDevGradle/packages/2178109)
### Repository Declaration
In order to use the artifacts published by the PR, add the following repository to your buildscript:
```gradle
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.
Isolated Source Sets
If you work with source sets that do not extend from
main
, and would like the modding dependencies to be available in those source sets, you can use the following api: