Using a listener to get download progress information


(Jamie Echlin) #1

Morning,

I’m using the tooling api. I’m using code along these lines:

        def launcher = connection.newBuild()
        def buildLauncher = launcher.forTasks("buildPlugin")
        buildLauncher.addProgressListener(new ProgressListener() {
            @Override
            void statusChanged(ProgressEvent event) {
                log.debug("progress: " + event.description)
            }
        })
        buildLauncher.run()

The problem is the build downloads some fairly hefty artifacts. What I would like to get is the kind of percentage complete information you can get if you run from the console. Has anyone got an example?

thanks, jamie