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:
Juuz
2022-12-09 10:50:21 +02:00
committed by GitHub
parent 2a5947de0b
commit 34c24cde3c

View File

@@ -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.
*