Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Finding it really difficult to understand Gradle

  • 11-07-2014 4:14pm
    #1
    Registered Users, Registered Users 2 Posts: 1,019
    ✭✭✭


    Hi,

    Just wondering if anyone has any tips/links/resources for Gradle? I've spent hours at this stage trying to get my head around it but I really can't seem to get it, at all. I don't understand how it works at a high or low level.

    I'm a Java developer and trying to get up to speed with Gradle because I'd love to move our current build away from Ant. It has become a monster and I think Gradle might help clean it up.

    For example: today I tried to write a task to unzip an archive. Ended up copying this from an article:
    task unzip(type: Copy) {
        def zipFile = file("D:/archive.zip")
        def outputDir = file("/unpacked/dist")
    
        from zipTree(zipFile)
        into outputDir
    }
    

    But then I realised I wanted a generic unzip task which I could change the archive/output directory for.

    This seems like it should be really straightforward but I can't figure it out. Which makes me think I've obviously misunderstood how the whole thing works. With other technologies I normally take some time to read/understand and then can figure things out but with Gradle I'm still stuck at 0 :(

    Any advice?

    Thanks


Comments

  • Moderators, Sports Moderators, Regional Abroad Moderators Posts: 2,666 TrueDub
    Mod ✭✭✭✭


    Are you doing lots of bespoke things in your build, or is it a pretty standard compile-test-assemble build?

    If it's pretty standard, I'd suggest looking at Maven, rather than Gradle. IMO, Gradle is excellent when you need to do unusual things, as the scripting is excellent, if a little obscure. However, a lot of Gradle builds I see simply implement the Maven plugin, and don't do anything that Maven wouldn't do.

    All my opinion, of course, your mileage may vary.


Advertisement