add modCompileOnly and include deps in the implementation configuration in the run tasks

dev/0.11
modmuss50 2019-09-06 19:59:45 +01:00
parent 7c6e9a37c0
commit 6bec4e592a
2 changed files with 10 additions and 4 deletions

View File

@ -62,9 +62,14 @@ public abstract class AbstractRunTask extends JavaExec {
MappingsProvider mappingsProvider = extension.getMappingsProvider();
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()) {
if (Files.isRegularFile(file)) {
libs.add(file.toFile().getAbsolutePath());

View File

@ -45,7 +45,8 @@ public class Constants {
new RemappedConfigurationEntry("modCompile", "compile", true, "compile"),
new RemappedConfigurationEntry("modApi", "api", true, "compile"),
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";