@SuppressWarnings("rawtypes")
protected void configurePackaging()
{
String cappedApiName = Character.toUpperCase(actualApiName().charAt(0)) + actualApiName().substring(1);
JavaPluginConvention javaConv = (JavaPluginConvention) project.getConvention().getPlugins().get("java");
// create apiJar task
Jar jarTask = makeTask("jar" + cappedApiName, Jar.class);
jarTask.from(javaConv.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput());
jarTask.setClassifier(actualApiName());
jarTask.setExtension(getJarExtension());
// configure otherPlugin task to have a classifier
((Jar) project.getTasks().getByName("jar")).setClassifier(((UserBasePlugin) otherPlugin).getApiName());
// configure reobf for litemod
((ReobfTask) project.getTasks().getByName("reobf")).reobf(jarTask, new Action<ArtifactSpec>()
{
@Override
public void execute(ArtifactSpec spec)
{
spec.setSrgMcp();
JavaPluginConvention javaConv = (JavaPluginConvention) project.getConvention().getPlugins().get("java");
spec.setClasspath(javaConv.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getCompileClasspath());
}
});
project.getArtifacts().add("archives", jarTask);