diff src/main/groovy/org/ssdt_ohio/gradle/tasks/UserDoc.groovy @ 15:e3c55e83c9a4

USASR-1307: start custom class/property displays
author Dave Smith <smith@nwoca.org>
date Fri, 17 Jan 2014 18:16:29 +0000
parents 9de72de14ab3
children 3741247de37a
line wrap: on
line diff
--- a/src/main/groovy/org/ssdt_ohio/gradle/tasks/UserDoc.groovy	Tue Dec 10 23:24:56 2013 +0000
+++ b/src/main/groovy/org/ssdt_ohio/gradle/tasks/UserDoc.groovy	Fri Jan 17 18:16:29 2014 +0000
@@ -3,7 +3,6 @@
 import org.codehaus.groovy.tools.groovydoc.ClasspathResourceManager
 import org.codehaus.groovy.tools.groovydoc.FileOutputTool
 import org.codehaus.groovy.tools.groovydoc.GroovyDocTool
-import org.codehaus.groovy.tools.groovydoc.OutputTool
 import org.codehaus.groovy.tools.groovydoc.gstringTemplates.GroovyDocTemplateInfo
 import org.gradle.api.InvalidUserDataException
 import org.gradle.api.file.FileCollection
@@ -30,6 +29,15 @@
         classPathRegistry = getServices().get(ClassPathRegistry.class);
     }
 
+    String windowTitle
+
+    String docTitle
+
+    Boolean publicScope = true
+    Boolean protectedScope = false
+    Boolean packageScope = false
+    Boolean privateScope = false
+
     @TaskAction
     protected void generate() {
         checkGroovyClasspathNonEmpty(getGroovyClasspath().getFiles());
@@ -48,15 +56,15 @@
         args.destdir = destinationDir
 
         Properties properties = new Properties();
-//        properties.setProperty("windowTitle", windowTitle);
-//        properties.setProperty("docTitle", docTitle);
+        properties.setProperty("windowTitle", windowTitle);
+        properties.setProperty("docTitle", docTitle);
 //        properties.setProperty("footer", footer);
 //        properties.setProperty("header", header);
 //        checkScopeProperties(properties);
-//        properties.setProperty("publicScope", publicScope.toString());
-//        properties.setProperty("protectedScope", protectedScope.toString());
-//        properties.setProperty("packageScope", packageScope.toString());
-//        properties.setProperty("privateScope", privateScope.toString());
+        properties.setProperty("publicScope", publicScope.toString());
+        properties.setProperty("protectedScope", protectedScope.toString());
+        properties.setProperty("packageScope", packageScope.toString());
+        properties.setProperty("privateScope", privateScope.toString());
 //        properties.setProperty("author", author.toString());
 //        properties.setProperty("processScripts", processScripts.toString());
 //        properties.setProperty("includeMainForScripts", includeMainForScripts.toString());
@@ -65,7 +73,7 @@
 //        properties.setProperty("fileEncoding", fileEncoding != null ? fileEncoding : "");
 //
 
-        def tool = new GroovyDocTool(new ClasspathResourceManager(),
+        def tool = new GroovyDocTool(new ClasspathResourceManager(this.getClass().getClassLoader()),
                 [tmpDir.getPath()] as String[],
                 getDocTemplates(),
                 getPackageTemplates(),