de.undercouch.gradle.tasks.download.internal
Class ProgressLoggerWrapper

java.lang.Object
  extended by de.undercouch.gradle.tasks.download.internal.ProgressLoggerWrapper

public class ProgressLoggerWrapper
extends java.lang.Object

Wraps around Gradle's internal progress logger. Uses reflection to provide as much compatibility to different Gradle versions as possible. Note that Gradle's progress logger does not belong to its public API.


Constructor Summary
ProgressLoggerWrapper(org.gradle.api.Project project, java.lang.String src)
          Create a progress logger wrapper
 
Method Summary
 void completed()
          Complete an operation
 void progress(java.lang.String msg)
          Set the current operation's progress
 void started()
          Start on operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressLoggerWrapper

public ProgressLoggerWrapper(org.gradle.api.Project project,
                             java.lang.String src)
                      throws java.lang.ClassNotFoundException,
                             java.lang.NoSuchMethodException,
                             java.lang.reflect.InvocationTargetException,
                             java.lang.IllegalAccessException
Create a progress logger wrapper

Parameters:
project - the current Gradle project
src - the URL to the file to be downloaded
Throws:
java.lang.ClassNotFoundException - if one of Gradle's internal classes could not be found
java.lang.NoSuchMethodException - if the interface of one of Gradle's internal classes has changed
java.lang.reflect.InvocationTargetException - if a method from one of Gradle's internal classes could not be invoked
java.lang.IllegalAccessException - if a method from one of Gradle's internal classes is not accessible
Method Detail

started

public void started()
Start on operation


completed

public void completed()
Complete an operation


progress

public void progress(java.lang.String msg)
Set the current operation's progress

Parameters:
msg - the progress message