package trang;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.Task;

/**
 * Used for converting .rnc files to .xsd files.
 * @author Rob Winch
 */
public class TrangPlugin implements Plugin<Project> {
	@Override
	public void apply(Project project) {
		Task rncToXsd = project.getTasks().create("rncToXsd", RncToXsd.class);
		rncToXsd.setDescription("Converts .rnc to .xsd");
		rncToXsd.setGroup("Build");
	}
}

@@ -73,36 +73,8 @@
 ect;
-%0Aimport org.gradle.api.Task;
 %0A%0A/*
@@ -258,24 +258,8 @@
 %7B%0A%09%09
-Task rncToXsd = 
 proj
@@ -277,14 +277,16 @@
 s().
-c
 re
-a
+gis
 te
+r
 (%22rn
@@ -308,19 +308,33 @@
 sd.class
-);%0A
+, rncToXsd -%3E %7B%0A%09
 %09%09rncToX
@@ -379,16 +379,17 @@
 sd%22);%0A%09%09
+%09
 rncToXsd
@@ -408,13 +408,19 @@
 uild%22);%0A
+%09%09%7D);%0A
 %09%7D%0A%7D%0A

Create the rncToXsd Task lazily