This is all what I need to create a inner data extension block?
import java.io.File;
import org.gradle.api.Action;
public class SiteExtension {
private File outputDir;
private final CustomData customData = new CustomData();
public void setOutputDir(File outputDir) {
this.outputDir = outputDir;
}
public File getOutputDir() {
return outputDir;
}
public CustomData getCustomData() {
return customData;
}
public void customData(Action<? super CustomData> action) {
action.execute(customData);
}
}
(and a pojo CustomData class)
Who, when and how method "customData" is called?
Simply creating extension:
project.getExtensions().create("name", SiteExtension.class);
Does not work.
What should be done? In the whole Gradle guide is absolutely not clear.
This is all what I need to create a inner data extension block?
(and a pojo CustomData class)
Who, when and how method "customData" is called?
Simply creating extension:
project.getExtensions().create("name", SiteExtension.class);Does not work.
What should be done? In the whole Gradle guide is absolutely not clear.