net.minecraftforge.gradle.common.BaseExtension Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of CelestiGradle Show documentation
Show all versions of CelestiGradle Show documentation
Gradle plugin for building Celestibytes projects. ForgeGradle included.
package net.minecraftforge.gradle.common;
import java.util.LinkedList;
import org.gradle.api.Project;
public class BaseExtension
{
protected Project project;
protected String version = "null";
protected String mcpVersion = "unknown";
protected String runDir = "run";
private LinkedList srgExtra = new LinkedList();
public BaseExtension(BasePlugin extends BaseExtension> plugin)
{
this.project = plugin.project;
}
public String getVersion()
{
return version;
}
public void setVersion(String version)
{
this.version = version;
}
public String getMcpVersion()
{
return mcpVersion;
}
public void setMcpVersion(String mcpVersion)
{
this.mcpVersion = mcpVersion;
}
public void setRunDir(String value)
{
this.runDir = value;
}
public String getRunDir()
{
return this.runDir;
}
@Deprecated
public void setAssetDir(String value)
{
runDir = value + "/..";
project.getLogger().lifecycle("The assetDir is deprecated! Use runDir instead! runDir set to "+runDir);
}
public LinkedList getSrgExtra()
{
return srgExtra;
}
public void srgExtra(String in)
{
srgExtra.add(in);
}
public void copyFrom(BaseExtension ext)
{
if ("null".equals(version))
{
setVersion(ext.getVersion());
}
if ("unknown".equals(mcpVersion))
{
setMcpVersion(ext.getMcpVersion());
}
}
}