Add back customManifest api

dev/0.11
modmuss50 2021-07-16 22:36:22 +01:00
parent e439a1b354
commit 777f30913b
3 changed files with 16 additions and 5 deletions

View File

@ -98,11 +98,6 @@ public interface LoomGradleExtension extends LoomGradleExtensionAPI {
return Boolean.parseBoolean(System.getProperty("idea.sync.active", "false")); return Boolean.parseBoolean(System.getProperty("idea.sync.active", "false"));
} }
default String getCustomManifest() {
// TODO reimplement
return null;
}
default String getIntermediaryUrl(String minecraftVersion) { default String getIntermediaryUrl(String minecraftVersion) {
// TODO reimplement a way to change this, was never really supported api anyway // TODO reimplement a way to change this, was never really supported api anyway
return String.format("https://maven.fabricmc.net/net/fabricmc/intermediary/%1$s/intermediary-%1$s-v2.jar", minecraftVersion); return String.format("https://maven.fabricmc.net/net/fabricmc/intermediary/%1$s/intermediary-%1$s-v2.jar", minecraftVersion);

View File

@ -80,4 +80,8 @@ public interface LoomGradleExtensionAPI {
void runs(Action<NamedDomainObjectContainer<RunConfigSettings>> action); void runs(Action<NamedDomainObjectContainer<RunConfigSettings>> action);
NamedDomainObjectContainer<RunConfigSettings> getRunConfigs(); NamedDomainObjectContainer<RunConfigSettings> getRunConfigs();
void setCustomManifest(String customManifest);
String getCustomManifest();
} }

View File

@ -57,6 +57,7 @@ public abstract class LoomGradleExtensionApiImpl implements LoomGradleExtensionA
protected boolean shareCaches = false; protected boolean shareCaches = false;
protected String refmapName = null; protected String refmapName = null;
protected boolean remapMod = true; protected boolean remapMod = true;
protected String customManifest;
private NamedDomainObjectContainer<RunConfigSettings> runConfigs; private NamedDomainObjectContainer<RunConfigSettings> runConfigs;
@ -158,6 +159,17 @@ public abstract class LoomGradleExtensionApiImpl implements LoomGradleExtensionA
return remapMod; return remapMod;
} }
@Override
public void setCustomManifest(String customManifest) {
Objects.requireNonNull(customManifest, "Custom manifest cannot be null");
this.customManifest = customManifest;
}
@Override
public String getCustomManifest() {
return customManifest;
}
protected abstract Project getProject(); protected abstract Project getProject();
protected abstract LoomFiles getFiles(); protected abstract LoomFiles getFiles();