annotate src/main/groovy/org/ssdt_ohio/gradle/tasks/UserDoc.groovy @ 28:204c063c93d3

USASR-2436: Bump snapshot version
author Christopher Springer <springer@nwoca.org>
date Wed, 21 Dec 2016 13:16:39 +0000
parents e2d02e8742be
children
rev   line source
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
1 package org.ssdt_ohio.gradle.tasks
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
2
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
3 import org.codehaus.groovy.tools.groovydoc.ClasspathResourceManager
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
4 import org.codehaus.groovy.tools.groovydoc.FileOutputTool
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
5 import org.codehaus.groovy.tools.groovydoc.GroovyDocTool
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
6 import org.codehaus.groovy.tools.groovydoc.gstringTemplates.GroovyDocTemplateInfo
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
7 import org.gradle.api.InvalidUserDataException
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
8 import org.gradle.api.file.FileCollection
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
9 import org.gradle.api.file.FileVisitDetails
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
10 import org.gradle.api.internal.ClassPathRegistry
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
11 import org.gradle.api.logging.LogLevel
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
12 import org.gradle.api.tasks.InputFiles
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
13 import org.gradle.api.tasks.OutputDirectory
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
14 import org.gradle.api.tasks.SourceTask
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
15 import org.gradle.api.tasks.TaskAction
17
3741247de37a USASR-1307: add helper to resolve template classpath problem
smith@nwoca.org
parents: 15
diff changeset
16 import org.ssdt_ohio.gradle.doc.tools.UserDocHelper
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
17
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
18 class UserDoc extends SourceTask {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
19
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
20 private FileCollection groovyClasspath;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
21
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
22 private FileCollection classpath;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
23
21
b14418c2ce40 set task output directory
smith@nwoca.org
parents: 17
diff changeset
24 @OutputDirectory
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
25 private File destinationDir;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
26
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
27 ClassPathRegistry classPathRegistry
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
28
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
29 public UserDoc() {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
30 getLogging().captureStandardOutput(LogLevel.INFO);
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
31 classPathRegistry = getServices().get(ClassPathRegistry.class);
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
32 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
33
15
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
34 String windowTitle
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
35
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
36 String docTitle
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
37
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
38 Boolean publicScope = true
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
39 Boolean protectedScope = false
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
40 Boolean packageScope = false
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
41 Boolean privateScope = false
22
b3282a66cc05 disable author property. change favicon
smith@nwoca.org
parents: 21
diff changeset
42 Boolean author = false
15
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
43
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
44 @TaskAction
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
45 protected void generate() {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
46 checkGroovyClasspathNonEmpty(getGroovyClasspath().getFiles());
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
47
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
48 def tmpDir = new File(project.buildDir, "tmp/userdoc")
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
49 logger.debug("userdoc tmpDir: $tmpDir")
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
50 project.delete tmpDir
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
51 logger.debug("userdoc source: ${super.source.collect { it.toString() }}")
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
52 project.copy {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
53 from super.getSource()
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
54 into tmpDir
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
55 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
56
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
57 def args = [:]
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
58 args.sourcepath = tmpDir.toString()
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
59 args.destdir = destinationDir
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
60
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
61 Properties properties = new Properties();
15
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
62 properties.setProperty("windowTitle", windowTitle);
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
63 properties.setProperty("docTitle", docTitle);
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
64 // properties.setProperty("footer", footer);
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
65 // properties.setProperty("header", header);
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
66 // checkScopeProperties(properties);
15
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
67 properties.setProperty("publicScope", publicScope.toString());
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
68 properties.setProperty("protectedScope", protectedScope.toString());
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
69 properties.setProperty("packageScope", packageScope.toString());
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
70 properties.setProperty("privateScope", privateScope.toString());
22
b3282a66cc05 disable author property. change favicon
smith@nwoca.org
parents: 21
diff changeset
71 properties.setProperty("author", author.toString());
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
72 // properties.setProperty("processScripts", processScripts.toString());
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
73 // properties.setProperty("includeMainForScripts", includeMainForScripts.toString());
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
74 // properties.setProperty("overviewFile", overviewFile != null ? overviewFile.getAbsolutePath() : "");
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
75 // properties.setProperty("charset", charset != null ? charset : "");
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
76 // properties.setProperty("fileEncoding", fileEncoding != null ? fileEncoding : "");
17
3741247de37a USASR-1307: add helper to resolve template classpath problem
smith@nwoca.org
parents: 15
diff changeset
77
23
e2d02e8742be usasr-1307: for render tables for properties and reportable properties with label and group names
smith@nwoca.org
parents: 22
diff changeset
78 // properties.put('doctor',Asciidoctor.Factory.create())
e2d02e8742be usasr-1307: for render tables for properties and reportable properties with label and group names
smith@nwoca.org
parents: 22
diff changeset
79
e2d02e8742be usasr-1307: for render tables for properties and reportable properties with label and group names
smith@nwoca.org
parents: 22
diff changeset
80 properties.put('userdocHelper', new UserDocHelper())
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
81
15
e3c55e83c9a4 USASR-1307: start custom class/property displays
Dave Smith <smith@nwoca.org>
parents: 14
diff changeset
82 def tool = new GroovyDocTool(new ClasspathResourceManager(this.getClass().getClassLoader()),
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
83 [tmpDir.getPath()] as String[],
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
84 getDocTemplates(),
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
85 getPackageTemplates(),
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
86 getClassTemplates(), [],
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
87 properties)
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
88
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
89 def addFiles = []
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
90
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
91 super.getSource().visit { FileVisitDetails d ->
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
92 if (d.file.isFile()) {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
93 addFiles << d.getRelativePath().toString()
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
94 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
95 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
96
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
97 tool.add(addFiles)
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
98 tool.renderToOutput(new FileOutputTool(), destinationDir.getCanonicalPath())
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
99 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
100
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
101 private void checkGroovyClasspathNonEmpty(Collection<File> classpath) {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
102 if (classpath.isEmpty()) {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
103 throw new InvalidUserDataException("You must assign a Groovy library to the groovy configuration!");
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
104 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
105 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
106
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
107 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
108 * Returns the directory to generate the documentation into.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
109 *
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
110 * @return The directory to generate the documentation into
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
111 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
112 @OutputDirectory
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
113 public File getDestinationDir() {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
114 return destinationDir;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
115 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
116
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
117 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
118 * Sets the directory to generate the documentation into.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
119 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
120 public void setDestinationDir(File destinationDir) {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
121 this.destinationDir = destinationDir;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
122 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
123
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
124 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
125 * Returns the classpath containing the Groovy library to be used.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
126 *
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
127 * @return The classpath containing the Groovy library to be used
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
128 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
129 @InputFiles
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
130 public FileCollection getGroovyClasspath() {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
131 return groovyClasspath;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
132 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
133
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
134 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
135 * Sets the classpath containing the Groovy library to be used.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
136 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
137 public void setGroovyClasspath(FileCollection groovyClasspath) {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
138 this.groovyClasspath = groovyClasspath;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
139 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
140
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
141 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
142 * Returns the classpath used to locate classes referenced by the documented sources.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
143 *
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
144 * @return The classpath used to locate classes referenced by the documented sources
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
145 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
146 @InputFiles
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
147 public FileCollection getClasspath() {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
148 return classpath;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
149 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
150
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
151 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
152 * Sets the classpath used to locate classes referenced by the documented sources.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
153 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
154 public void setClasspath(FileCollection classpath) {
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
155 this.classpath = classpath;
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
156 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
157
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
158 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
159 * Creates and returns an array of package template classpath entries.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
160 * <p>
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
161 * This method is meant to be overridden by custom GroovyDoc implementations, using custom package templates.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
162 *
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
163 * @return an array of package templates, whereas each entry is resolved as classpath entry, defaults to
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
164 * {@link GroovyDocTemplateInfo#DEFAULT_PACKAGE_TEMPLATES}.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
165 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
166 protected String[] getPackageTemplates() {
14
9de72de14ab3 USASR-1307: customize CSS and override class template
Dave Smith <smith@nwoca.org>
parents: 13
diff changeset
167 return UserDocTemplateInfo.DEFAULT_PACKAGE_TEMPLATES;
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
168 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
169
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
170 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
171 * Creates and returns an array of doc template classpath entries.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
172 * <p>
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
173 * This method is meant to be overridden by custom GroovyDoc implementations, using custom doc templates.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
174 *
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
175 * @return an array of doc templates, whereas each entry is resolved as classpath entry, defaults to
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
176 * {@link GroovyDocTemplateInfo#DEFAULT_DOC_TEMPLATES}.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
177 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
178 protected String[] getDocTemplates() {
14
9de72de14ab3 USASR-1307: customize CSS and override class template
Dave Smith <smith@nwoca.org>
parents: 13
diff changeset
179 return UserDocTemplateInfo.DEFAULT_DOC_TEMPLATES;
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
180 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
181
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
182 /**
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
183 * Creates and returns an array of class template classpath entries.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
184 * <p>
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
185 * This method is meant to be overridden by custom GroovyDoc implementations, using custom class templates.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
186 *
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
187 * @return an array of class templates, whereas each entry is resolved as classpath entry, defaults to
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
188 * {@link GroovyDocTemplateInfo#DEFAULT_CLASS_TEMPLATES}.
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
189 */
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
190 protected String[] getClassTemplates() {
14
9de72de14ab3 USASR-1307: customize CSS and override class template
Dave Smith <smith@nwoca.org>
parents: 13
diff changeset
191 return UserDocTemplateInfo.DEFAULT_CLASS_TEMPLATES;
13
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
192 }
a628135958e7 USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff changeset
193 }