mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
Deprecate ForgeLocalMod API for removal
This commit is contained in:
@@ -138,7 +138,10 @@ public interface ForgeExtensionAPI {
|
||||
* Configures local mods.
|
||||
*
|
||||
* @param action the configuration action
|
||||
* @deprecated Replaced with {@link LoomGradleExtensionAPI#mods(Action)}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "0.12.0")
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "1.0")
|
||||
void localMods(Action<NamedDomainObjectContainer<ForgeLocalMod>> action);
|
||||
|
||||
/**
|
||||
@@ -146,6 +149,9 @@ public interface ForgeExtensionAPI {
|
||||
*
|
||||
* @return the container
|
||||
* @see ForgeLocalMod
|
||||
* @deprecated Replaced with {@link LoomGradleExtensionAPI#getMods()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "0.12.0")
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "1.0")
|
||||
NamedDomainObjectContainer<ForgeLocalMod> getLocalMods();
|
||||
}
|
||||
|
||||
@@ -32,11 +32,14 @@ import org.gradle.api.Named;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.plugins.JavaPluginConvention;
|
||||
import org.gradle.api.tasks.SourceSet;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Data for a mod built from project files in a dev environment.
|
||||
* This data is only used for run config generation (FML needs the paths to mod files).
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "0.12.0")
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "1.0")
|
||||
public class ForgeLocalMod implements Named {
|
||||
private final Project project;
|
||||
private final String name;
|
||||
|
||||
@@ -126,11 +126,13 @@ public class ForgeExtensionImpl implements ForgeExtensionAPI {
|
||||
|
||||
@Override
|
||||
public void localMods(Action<NamedDomainObjectContainer<ForgeLocalMod>> action) {
|
||||
extension.getDeprecationHelper().toBeRemovedIn("loom.forge.localMods", "loom.mods", "1.0");
|
||||
action.execute(localMods);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NamedDomainObjectContainer<ForgeLocalMod> getLocalMods() {
|
||||
extension.getDeprecationHelper().toBeRemovedIn("loom.forge.localMods", "loom.mods", "1.0");
|
||||
return localMods;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user