SomeCat

    SomeCat

    1 year ago
    Hello folks! Question on gradle and docker, from the perspective: we will have to run gradle to build our product within a docker container. Are there any best practices for such a setup? (the online resources I found mostly talk about using docker by gradle, to establish test configurations and such, but not how to run gradle inside docker) Myself, I can think of: • make sure that the build cache is shared across docker runs to avoid constant “starting from 0” • make sure that gradle does NOT run as server (at least for us, our docker sessions are invoked for a built, and then discarded) • make sure the desired gradle version is installed in the docker image you are using What are your thoughts?
    c

    CLOVIS

    1 year ago
    If you mean CI, this is probably a good start: https://stackoverflow.com/a/36050711/5666171 (of course that's the GitLab syntax but it should be easy to translate to your usage)
    n

    no

    1 year ago
    Where does Kotlin come in to play here?
    SomeCat

    SomeCat

    1 year ago
    @no Well, the channel description says “Discuss Build Tools such as Maven, Gradle, Ant, Command Line”. But I can assure you that we write our gradle setup using kotlin 😉
    rnett

    rnett

    1 year ago
    I'd add "Use gradle wrapper" to your list. It's default most of the time, but ensures you don't somehow end up with the wrong version
    SomeCat

    SomeCat

    1 year ago
    And another one, that sucks. You have to “balance” “being clean and using the right language” with … supporting different IDEs. We have some VS code users. And VS code states that you need the redhat extension for java language support, based on eclipse stuff, and buildship. And it seems: that one doesnt work with kotlin build gradle files.