mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 05:05:20 -05:00
Add ModSettings.sourceSet overloads taking source set names (#765)
Closes #764. Also fixes some minor stuff in the javadocs of sourceSet().
This commit is contained in:
@@ -54,7 +54,7 @@ public abstract class ModSettings implements Named {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add {@link SourceSet}'s output directories from the current project to be grouped with the named mod.
|
||||
* Add {@link SourceSet}'s output directories from the current project to be grouped with the named mod.
|
||||
*/
|
||||
public void sourceSet(SourceSet sourceSet) {
|
||||
Project project = getProject();
|
||||
@@ -72,12 +72,30 @@ public abstract class ModSettings implements Named {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add {@link SourceSet}'s output directories from supplied project to be grouped with the named mod.
|
||||
* Add {@link SourceSet}'s output directories from the current project to be grouped with the named mod.
|
||||
*
|
||||
* @param name the name of the source set
|
||||
*/
|
||||
public void sourceSet(String name) {
|
||||
sourceSet(name, getProject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Add {@link SourceSet}'s output directories from the supplied project to be grouped with the named mod.
|
||||
*/
|
||||
public void sourceSet(SourceSet sourceSet, Project project) {
|
||||
getModSourceSets().add(new SourceSetReference(sourceSet, project));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add {@link SourceSet}'s output directories from the supplied project to be grouped with the named mod.
|
||||
*
|
||||
* @param name the name of the source set
|
||||
*/
|
||||
public void sourceSet(String name, Project project) {
|
||||
sourceSet(SourceSetHelper.getSourceSetByName(name, project), project);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a number of {@link Dependency} to the mod's classpath group. Should be used to include all dependencies that are shaded into your mod.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user