Can I scp only changed output files?


(Tilmann Kuhn) #1

I am just considering gradle as a replacement for our ant build because I want to speed up build times. At the end our current build scps the whole build output to a server which is the really slow part of the build. Especially if it is run repeatedly the waiting time gets annoying. Therefore my question: Is it possible with gradle on repeated builds to only scp the output files that have changed in the current build run?

Regards, Tilmann


(Peter Niederwieser) #2

The Gradle build could scp only those artifacts that have been changed, but it wouldn’t be able to tell you which parts of an artifact have changed.


(Tilmann Kuhn) #3

Is artifact = file or artifact = whole task output here?

Our build (mainly) compiles java files into classes and then currently scps all 10.000 class files to the server. What I’d like to achieve is that only the 5 or so modified classes get scped on consecutive builds.

I think if a can get a collection of changed files only this is what I need and I’d enjoy investing the time to rewrite the whole build process using gradle :slight_smile:


(Peter Niederwieser) #4

You can’t currently get a list of changed files from Gradle. It’s something you’d have to implement yourself. In any case, I’d try to send the files as a (possibly compressed) archive.


(Tilmann Kuhn) #5

Thanks for the hints. The compressed option is one I can easily add to the ant build too. Then I guess I better start using gradle for new projects first before rewriting the rather sophisticated existing build scripts we have.