Package org.openclover.ant.groovy
Class GroovycSupport
java.lang.Object
org.openclover.ant.groovy.GroovycSupport
- All Implemented Interfaces:
EventListener,org.apache.tools.ant.BuildListener
-
Method Summary
Modifier and TypeMethodDescriptionvoidbuildFinished(org.apache.tools.ant.BuildEvent buildEvent) voidbuildStarted(org.apache.tools.ant.BuildEvent buildEvent) static voidensureAddedTo(org.apache.tools.ant.Project project) static FileextractGroverJar(File groverJar, boolean deleteOnExit) Extracts the grover.jar file from a resource embedded in the Clover JAR file.protected voidinitGroovycTaskNames(org.apache.tools.ant.Project project) protected booleanisGroovyc(org.apache.tools.ant.Task task) voidmessageLogged(org.apache.tools.ant.BuildEvent buildEvent) static FilenewConfigDir(org.openclover.core.cfg.instr.InstrumentationConfig config, File parent) voidprepareForGroovyInstrumentation(org.apache.tools.ant.Task groovyc, org.apache.tools.ant.Project project, AntInstrumentationConfig config) Extract grover.jar so that groovyc compiler will pick Clover's AST transformer.voidtargetFinished(org.apache.tools.ant.BuildEvent buildEvent) voidtargetStarted(org.apache.tools.ant.BuildEvent buildEvent) voidtaskFinished(org.apache.tools.ant.BuildEvent buildEvent) voidtaskStarted(org.apache.tools.ant.BuildEvent buildEvent)
-
Method Details
-
ensureAddedTo
public static void ensureAddedTo(@NotNull org.apache.tools.ant.Project project) -
buildStarted
public void buildStarted(@NotNull org.apache.tools.ant.BuildEvent buildEvent) - Specified by:
buildStartedin interfaceorg.apache.tools.ant.BuildListener
-
buildFinished
public void buildFinished(@NotNull org.apache.tools.ant.BuildEvent buildEvent) - Specified by:
buildFinishedin interfaceorg.apache.tools.ant.BuildListener
-
targetStarted
public void targetStarted(@NotNull org.apache.tools.ant.BuildEvent buildEvent) - Specified by:
targetStartedin interfaceorg.apache.tools.ant.BuildListener
-
targetFinished
public void targetFinished(@NotNull org.apache.tools.ant.BuildEvent buildEvent) - Specified by:
targetFinishedin interfaceorg.apache.tools.ant.BuildListener
-
messageLogged
public void messageLogged(@NotNull org.apache.tools.ant.BuildEvent buildEvent) - Specified by:
messageLoggedin interfaceorg.apache.tools.ant.BuildListener
-
taskFinished
public void taskFinished(@NotNull org.apache.tools.ant.BuildEvent buildEvent) - Specified by:
taskFinishedin interfaceorg.apache.tools.ant.BuildListener
-
taskStarted
public void taskStarted(@NotNull org.apache.tools.ant.BuildEvent buildEvent) - Specified by:
taskStartedin interfaceorg.apache.tools.ant.BuildListener
-
prepareForGroovyInstrumentation
public void prepareForGroovyInstrumentation(@NotNull org.apache.tools.ant.Task groovyc, @NotNull org.apache.tools.ant.Project project, @NotNull AntInstrumentationConfig config) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, org.openclover.runtime.api.CloverException, IOException Extract grover.jar so that groovyc compiler will pick Clover's AST transformer. Also instrument Java files and redirect source folders if we have a joint Groovy-Java compilation.- Throws:
NoSuchMethodExceptionIllegalAccessExceptionInvocationTargetExceptionorg.openclover.runtime.api.CloverExceptionIOException
-
extractGroverJar
Extracts the grover.jar file from a resource embedded in the Clover JAR file.- Parameters:
groverJar- target location for extracted grover.jar file or null for default locationdeleteOnExit- whether file should be deleted on JVM termination- Returns:
- File location of extracted grover.jar of null if failed
-
newConfigDir
public static File newConfigDir(org.openclover.core.cfg.instr.InstrumentationConfig config, File parent) throws IOException - Throws:
IOException
-
initGroovycTaskNames
protected void initGroovycTaskNames(@NotNull org.apache.tools.ant.Project project) -
isGroovyc
protected boolean isGroovyc(@NotNull org.apache.tools.ant.Task task)
-