add modCompileOnly and include deps in the implementation configuration in the run tasks
This commit is contained in:
		
							parent
							
								
									7c6e9a37c0
								
							
						
					
					
						commit
						6bec4e592a
					
				
					 2 changed files with 10 additions and 4 deletions
				
			
		|  | @ -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"; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue