mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
add modCompileOnly and include deps in the implementation configuration in the run tasks
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user