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 2018/07/10 00:28:14 UTC

groovy git commit: ant doco still referenced groovy-all jar plus was missing some attributes

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X 0361271ae -> 1f44e313a


ant doco still referenced groovy-all jar plus was missing some attributes


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

Branch: refs/heads/GROOVY_2_5_X
Commit: 1f44e313a2fc3c20b5a6a088310eab4065c1f551
Parents: 0361271
Author: Paul King <pa...@asert.com.au>
Authored: Tue Jul 10 10:28:08 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Tue Jul 10 10:28:08 2018 +1000

----------------------------------------------------------------------
 src/spec/doc/tools-groovyc.adoc                 | 30 +++++++++++++++---
 .../src/spec/doc/groovy-ant-task.adoc           | 32 ++++++++++++++++++--
 2 files changed, 55 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/1f44e313/src/spec/doc/tools-groovyc.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/tools-groovyc.adoc b/src/spec/doc/tools-groovyc.adoc
index ac6f9aa..db29911 100644
--- a/src/spec/doc/tools-groovyc.adoc
+++ b/src/spec/doc/tools-groovyc.adoc
@@ -74,9 +74,9 @@ Compiles Groovy source files and, if joint compilation option is used, Java sour
 Required taskdef
 ^^^^^^^^^^^^^^^^
 
-Assuming `groovy-all-VERSION.jar` is in _my.classpath_ you will need to
-declare this task at some point in the `build.xml` prior to the `groovyc`
-task being invoked.
+Assuming all the groovy jars you need are in _my.classpath_ (this will be `groovy-VERSION.jar`,
+`groovy-ant-VERSION.jar` plus any modules and transitive dependencies you might be using)
+you will need to declare this task at some point in the `build.xml` prior to the `groovyc` task being invoked.
 
 [source,xml]
 ----------------------------------------------------
@@ -115,6 +115,9 @@ classpath; defaults to yes. |No
 |includeJavaRuntime |Whether to include the default run-time libraries
 from the executing VM in the classpath; defaults to no. |No
 
+|includeDestClasses |This property controls whether to include the destination
+classes directory in the classpath given to the compiler. The default value is "true". |No
+
 |fork |Whether to execute groovyc using a spawned instance of the JVM;
 defaults to no. |No
 
@@ -129,6 +132,8 @@ memory setting. (Examples: 83886080, 81920k, or 80m) |No
 |failonerror |Indicates whether compilation errors will fail the build;
 defaults to true. |No
 
+|proceed |Inverse alias for _failonerror_. |No
+
 |listfiles |Indicates whether the source files to be compiled will be
 listed; defaults to no. |No
 
@@ -157,7 +162,24 @@ you need to set this flag to true. Defaults to false. |No
 
 |configscript |Set the configuration file used to customize the compilation configuration. |No
 
-|parameters |Generates metadata for reflection on method parameter names on JDK 8 and above. Defaults to false. |No
+|parameters |Generates metadata for reflection on method parameter names on JDK 8 and above.
+Defaults to false. |No
+
+|targetBytecode |Sets the bytecode compatibility level. |No
+
+|javahome |Sets the `java.home` value to use, default is the current JDK's home. |No
+
+|executable |Sets the name of the java executable to use when invoking the compiler in forked mode,
+ignored otherwise. |No
+
+|scriptExtension |Set the extension to use when searching for Groovy source files.
+Accepts extensions in the form *.groovy, .groovy or groovy. |No
+
+|updatedProperty |The property to set on compilation success. This property will not be set if
+the compilation fails, or if there are no files to compile. |No
+
+|errorProperty |The property to set on compilation failure. This property will be set if
+the compilation fails. |No
 
 |=======================================================================
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/1f44e313/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc b/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc
index 026e78a..d3261ad 100644
--- a/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc
+++ b/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc
@@ -26,16 +26,36 @@ Statements can either be read in from a text file using the `src` attribute or f
 
 == Required taskdef
 
-Assuming `groovy-all-VERSION.jar` is in `my.classpath` you will need to declare this task in the `build.xml` prior to using it:
+Assuming all the groovy jars you need are in _my.classpath_ (this will be `groovy-VERSION.jar`,
+`groovy-ant-VERSION.jar` plus any modules and transitive dependencies you might be using)
+you will need to declare this task at some point in the `build.xml` prior to
+the `groovy` task being invoked.
 
 [source,xml]
 ----
 <taskdef name="groovy"
          classname="org.codehaus.groovy.ant.Groovy"
          classpathref="my.classpath"/>
+----
+
+Now use the task like this:
+
+[source,xml]
+----
+<groovy src="..." otherAttributes="...">
+----
+
+Or this:
+
+[source,xml]
+----
 <groovy>
+...
+</groovy>
 ----
 
+You might need to use the _contextClassLoader_ attribute (see below) if any of your modules load services via the classpath, e.g. `groovy-json`.
+
 == <groovy> attributes
 
 [cols="<1,<2,<1",options="header,footer"]
@@ -45,10 +65,16 @@ Assuming `groovy-all-VERSION.jar` is in `my.classpath` you will need to declare
 |classpath|The classpath to use.|No
 |classpathref|The classpath to use, given as reference to a PATH defined elsewhere.|No
 |output|Set the output file; defaults to the Ant log.|No
-|fork|If enabled the script will be executed in another JVM (disabled by default).|No
+|append|If enabled and output is to a file, append to existing file rather than overwrite. Defaults to false.|No
+|fork|If enabled the script will be executed in a forked JVM process (disabled by default).|No
 |scriptBaseClass|The name of the base class for scripts.|No
 |indy|If enabled the script will be executed with `invokedynamic` (disabled by default).|No
-|parameters |Generates metadata for reflection on method parameter names on JDK 8 and above. Defaults to false. |No
+|parameters|Generates metadata for reflection on method parameter names on JDK 8 and above. Defaults to false. |No
+|useGroovyShell|If enabled a new GroovyShell is used to run the script. Special variables won't be available but you don't need Ant in the classpath. Defaults to false. |No
+|includeAntRuntime|If enabled the system classpath will be included on the classpath when forking. Defaults to true. |No
+|stacktrace|If enabled a stacktrace will be reported if an error occurs during compilation. Defaults to false. |No
+|configScript|Sets the configuration script for the groovy compiler configuration. |No
+|contextClassLoader|If enabled, the contextClassLoader to be set with the classLoader of the shell used to run the script. Not used if fork is true. |No
 |============================================
 
 == Parameters specified as nested elements