Create the rncToXsd Task lazily
This commit is contained in:
parent
fb9bd57936
commit
a5cdd8451d
|
@ -2,7 +2,6 @@ package trang;
|
||||||
|
|
||||||
import org.gradle.api.Plugin;
|
import org.gradle.api.Plugin;
|
||||||
import org.gradle.api.Project;
|
import org.gradle.api.Project;
|
||||||
import org.gradle.api.Task;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used for converting .rnc files to .xsd files.
|
* Used for converting .rnc files to .xsd files.
|
||||||
|
@ -11,8 +10,9 @@ import org.gradle.api.Task;
|
||||||
public class TrangPlugin implements Plugin<Project> {
|
public class TrangPlugin implements Plugin<Project> {
|
||||||
@Override
|
@Override
|
||||||
public void apply(Project project) {
|
public void apply(Project project) {
|
||||||
Task rncToXsd = project.getTasks().create("rncToXsd", RncToXsd.class);
|
project.getTasks().register("rncToXsd", RncToXsd.class, rncToXsd -> {
|
||||||
rncToXsd.setDescription("Converts .rnc to .xsd");
|
rncToXsd.setDescription("Converts .rnc to .xsd");
|
||||||
rncToXsd.setGroup("Build");
|
rncToXsd.setGroup("Build");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue