add modCompileOnly and include deps in the implementation configuration in the run tasks
parent
7c6e9a37c0
commit
6bec4e592a
|
@ -62,9 +62,14 @@ public abstract class AbstractRunTask extends JavaExec {
|
||||||
MappingsProvider mappingsProvider = extension.getMappingsProvider();
|
MappingsProvider mappingsProvider = extension.getMappingsProvider();
|
||||||
|
|
||||||
List<String> libs = new ArrayList<>();
|
List<String> libs = new ArrayList<>();
|
||||||
for (File file : getProject().getConfigurations().getByName("compile").getFiles()) {
|
|
||||||
libs.add(file.getAbsolutePath());
|
String[] configurations = new String[]{"compile", "implementation"};
|
||||||
}
|
for(String configuration : configurations){
|
||||||
|
for (File file : getProject().getConfigurations().getByName(configuration).getFiles()) {
|
||||||
|
libs.add(file.getAbsolutePath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (Path file : extension.getUnmappedMods()) {
|
for (Path file : extension.getUnmappedMods()) {
|
||||||
if (Files.isRegularFile(file)) {
|
if (Files.isRegularFile(file)) {
|
||||||
libs.add(file.toFile().getAbsolutePath());
|
libs.add(file.toFile().getAbsolutePath());
|
||||||
|
|
|
@ -45,7 +45,8 @@ public class Constants {
|
||||||
new RemappedConfigurationEntry("modCompile", "compile", true, "compile"),
|
new RemappedConfigurationEntry("modCompile", "compile", true, "compile"),
|
||||||
new RemappedConfigurationEntry("modApi", "api", true, "compile"),
|
new RemappedConfigurationEntry("modApi", "api", true, "compile"),
|
||||||
new RemappedConfigurationEntry("modImplementation", "implementation", true, "runtime"),
|
new RemappedConfigurationEntry("modImplementation", "implementation", true, "runtime"),
|
||||||
new RemappedConfigurationEntry("modRuntime", "runtimeOnly", false, "")
|
new RemappedConfigurationEntry("modRuntime", "runtimeOnly", false, ""),
|
||||||
|
new RemappedConfigurationEntry("modCompileOnly", "compileOnly", true, "")
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final String INCLUDE = "include";
|
public static final String INCLUDE = "include";
|
||||||
|
|
Loading…
Reference in New Issue