groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject incubator-groovy git commit: GROOVY-7612: GroovyDoc should allow timestamp/version stamp info to be omitted (extend support to ant task)
Date Tue, 03 Nov 2015 02:48:20 GMT
Repository: incubator-groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 2d96866c4 -> 674aabb51


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/674aabb5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/674aabb5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/674aabb5

Branch: refs/heads/GROOVY_2_4_X
Commit: 674aabb51cb9e140559075c36e96def2ddf26f6d
Parents: 2d96866
Author: paulk <paulk@asert.com.au>
Authored: Tue Nov 3 12:45:04 2015 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Tue Nov 3 12:48:03 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/674aabb5/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);


Mime
View raw message