mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 21:05:58 -05:00
Add localRuntime and modLocalRuntime configurations (#526)
Closes #481. Co-authored-by: modmuss50 <modmuss50@gmail.com>
This commit is contained in:
@@ -68,6 +68,8 @@ public final class CompileConfiguration {
|
||||
extension.createLazyConfiguration(Constants.Configurations.MAPPINGS_FINAL);
|
||||
extension.createLazyConfiguration(Constants.Configurations.LOOM_DEVELOPMENT_DEPENDENCIES);
|
||||
extension.createLazyConfiguration(Constants.Configurations.UNPICK_CLASSPATH);
|
||||
extension.createLazyConfiguration(Constants.Configurations.LOCAL_RUNTIME);
|
||||
extendsFrom(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME, Constants.Configurations.LOCAL_RUNTIME, project);
|
||||
|
||||
for (RemappedConfigurationEntry entry : Constants.MOD_COMPILE_ENTRIES) {
|
||||
extension.createLazyConfiguration(entry.sourceConfiguration())
|
||||
|
||||
@@ -49,7 +49,8 @@ public class Constants {
|
||||
new RemappedConfigurationEntry("modRuntime", JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME, false, true, "", "modRuntimeOnly"),
|
||||
new RemappedConfigurationEntry("modCompileOnly", JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME, true, false, ""),
|
||||
new RemappedConfigurationEntry("modCompileOnlyApi", JavaPlugin.COMPILE_ONLY_API_CONFIGURATION_NAME, true, false, JavaPlugin.API_ELEMENTS_CONFIGURATION_NAME),
|
||||
new RemappedConfigurationEntry("modRuntimeOnly", JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME, false, true, JavaPlugin.RUNTIME_ELEMENTS_CONFIGURATION_NAME)
|
||||
new RemappedConfigurationEntry("modRuntimeOnly", JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME, false, true, JavaPlugin.RUNTIME_ELEMENTS_CONFIGURATION_NAME),
|
||||
new RemappedConfigurationEntry("modLocalRuntime", Configurations.LOCAL_RUNTIME, false, true, "")
|
||||
);
|
||||
|
||||
private Constants() {
|
||||
@@ -72,6 +73,12 @@ public class Constants {
|
||||
public static final String LOOM_DEVELOPMENT_DEPENDENCIES = "loomDevelopmentDependencies";
|
||||
public static final String MAPPING_CONSTANTS = "mappingsConstants";
|
||||
public static final String UNPICK_CLASSPATH = "unpick";
|
||||
/**
|
||||
* A configuration that behaves like {@code runtimeOnly} but is not
|
||||
* exposed in {@code runtimeElements} to dependents. A bit like
|
||||
* {@code testRuntimeOnly}, but for mods.
|
||||
*/
|
||||
public static final String LOCAL_RUNTIME = "localRuntime";
|
||||
public static final String NAMED_ELEMENTS = "namedElements";
|
||||
|
||||
private Configurations() {
|
||||
|
||||
Reference in New Issue
Block a user