mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-03 05:57:42 -05:00
Move Iface injection to new MinecraftJarProcessor API
This commit is contained in:
@@ -38,15 +38,15 @@ public interface InterfaceInjectionExtensionAPI {
|
||||
*/
|
||||
Property<Boolean> getEnableDependencyInterfaceInjection();
|
||||
|
||||
Property<Boolean> getIsEnabled();
|
||||
|
||||
/**
|
||||
* Contains a list of {@link SourceSet} that may contain a fabric.mod.json file with interfaces to inject.
|
||||
* By default, this list contains only the main {@link SourceSet}.
|
||||
*
|
||||
* @return the list property containing the {@link SourceSet}
|
||||
* @deprecated now uses the source sets defined in {@link LoomGradleExtensionAPI#getMods()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
ListProperty<SourceSet> getInterfaceInjectionSourceSets();
|
||||
|
||||
default boolean isEnabled() {
|
||||
return getEnableDependencyInterfaceInjection().get() || !getInterfaceInjectionSourceSets().get().isEmpty();
|
||||
return getIsEnabled().get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
|
||||
package net.fabricmc.loom.api.processor;
|
||||
|
||||
import net.fabricmc.loom.api.mappings.layered.MappingsNamespace;
|
||||
import net.fabricmc.loom.configuration.providers.minecraft.MinecraftJarConfiguration;
|
||||
import net.fabricmc.tinyremapper.TinyRemapper;
|
||||
|
||||
public interface ProcessorContext {
|
||||
MinecraftJarConfiguration getJarConfiguration();
|
||||
@@ -34,4 +36,6 @@ public interface ProcessorContext {
|
||||
boolean includesClient();
|
||||
|
||||
boolean includesServer();
|
||||
|
||||
TinyRemapper createRemapper(MappingsNamespace from, MappingsNamespace to);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@ public interface SpecContext {
|
||||
|
||||
List<FabricModJson> localMods();
|
||||
|
||||
// Returns mods that are both on the compile and runtime classpath
|
||||
List<FabricModJson> modDependenciesCompileRuntime();
|
||||
|
||||
default List<FabricModJson> allMods() {
|
||||
return Stream.concat(modDependencies().stream(), localMods().stream()).toList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user