Hi, I’m trying to port over an existing ant build that contains 50 or so applications. They’re all built in a similar way except for application names and file paths.
Do I bite the bullet and create 50 individual build files thinking that I’ll be better prepared for when parallelisation comes along?
Each one is an application that makes up one large logical application so they’re all active and fortunately, have no dependencies between them. There’s also no requirement to version them separately. I’m in Websphere BPEL land here.
The main reason for using Gradle is because it feels like the mechanism for checking up-to-date tasks is much better than doing it in Ant. What I’ve ended up doing so far is wrap our Ant build in Gradle and loop through all the targets to create corresponding Gradle tasks where I can determine the inputs and outputs.
All the logic’s still in Ant for now but I’m happy with that because it’s still a big step forward.
That’s a valid strategy for non trivial ant builds, and one that we recommend a lot.
If you’re using the ant import ability, be aware that you can make ant targets incremental without needing to “rewrite” it into a Gradle task. If you add the appropriate ‘inputs.files’ and ‘outputs.files’ for the imported ant target it will still be incremental.
You might want to check out the upcoming webinar on migration to Gradle.