You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2015/11/03 03:46:17 UTC

incubator-groovy git commit: GROOVY-7612: GroovyDoc should allow timestamp/version stamp info to be omitted (extend support to ant task)

Repository: incubator-groovy
Updated Branches:
  refs/heads/master 62269f6c6 -> 131268947


GROOVY-7612: GroovyDoc should allow timestamp/version stamp info to be omitted (extend support to ant task)


Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/13126894
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/13126894
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/13126894

Branch: refs/heads/master
Commit: 1312689470d86540bdb6e7762e3b4d4d0063c560
Parents: 62269f6
Author: paulk <pa...@asert.com.au>
Authored: Tue Nov 3 12:45:04 2015 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Tue Nov 3 12:45:55 2015 +1000

----------------------------------------------------------------------
 .../java/org/codehaus/groovy/ant/Groovydoc.java | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/13126894/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovydoc.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovydoc.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovydoc.java
index b8edf24..2710cbd 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovydoc.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovydoc.java
@@ -59,6 +59,8 @@ public class Groovydoc extends Task {
     private Boolean includeMainForScripts;
     private boolean useDefaultExcludes;
     private boolean includeNoSourcePackages;
+    private Boolean noTimestamp;
+    private Boolean noVersionStamp;
     private List<DirSet> packageSets;
     private List<String> sourceFilesToDoc;
     private List<LinkArgument> links = new ArrayList<LinkArgument>();
@@ -84,6 +86,8 @@ public class Groovydoc extends Task {
         author = true;
         processScripts = true;
         includeMainForScripts = true;
+        noTimestamp = false;
+        noVersionStamp = false;
     }
 
     /**
@@ -120,6 +124,24 @@ public class Groovydoc extends Task {
     }
 
     /**
+     * If set to true, hidden timestamp will not appear within generated HTML.
+     *
+     * @param noTimestamp new value
+     */
+    public void setNoTimestamp(boolean noTimestamp) {
+        this.noTimestamp = noTimestamp;
+    }
+
+    /**
+     * If set to true, hidden version stamp will not appear within generated HTML.
+     *
+     * @param noVersionStamp new value
+     */
+    public void setNoVersionStamp(boolean noVersionStamp) {
+        this.noVersionStamp = noVersionStamp;
+    }
+
+    /**
      * If set to false, Scripts will not be processed.
      * Defaults to true.
      *
@@ -424,6 +446,8 @@ public class Groovydoc extends Task {
         properties.setProperty("overviewFile", overviewFile != null ? overviewFile.getAbsolutePath() : "");
         properties.setProperty("charset", charset != null ? charset : "");
         properties.setProperty("fileEncoding", fileEncoding != null ? fileEncoding : "");
+        properties.setProperty("timestamp", Boolean.valueOf(!noTimestamp).toString());
+        properties.setProperty("versionStamp", Boolean.valueOf(!noVersionStamp).toString());
 
         if (sourcePath != null) {
             sourceDirs.addExisting(sourcePath);