I'm looking for some non-trivial (spring/backend r...
# gradle
m
I'm looking for some non-trivial (spring/backend related, multi-module, ...) OSS project which is using Gradle with Kotlin DSL, so that I could get some inspiration. Any recommendations? (already posted this to #spring, but it's probably more Gradle related). Thanks
b
What are you going for? While not Spring, we have quite complex KMP multi-module projects on GitHub to check out. We're working with composite builds and custom plugins. We do use those projects successfully in (closed-source) spring boot projects, android apps and CMP projects (from time to time als composite builds too). We were in for a bumpy start more than one and a half years ago but tooling has since mature considerably and now everything's running smoothly. EDIT: This is the most complex build we have on GitHub
m
I'm working in https://github.com/apollographql/apollo-kotlin. There are multiple modules, included builds for build logic and integration tests. There are also gradle scripts to build a Gradle plugin.
At the end of the day, there are several ways to do it. My recommendations would be: • Use Kotlin (which looks like you're already doing) • Share your build logic in an included build. No need for
kotlin-dsl
or precompiled script plugins there. Plain Kotlin works fine
m
My goal is to keep up-to-date with new features/best-practices/tricks. I already have working multi-module project with custom conventions plugins etc, ... but I would like to keep it nice and clean. 🙂 It's already 5ish years old, but it was my/our first Kotlin/Gradle/JVM project (with little/no prior experience with any of this stuff).
Thanks for links!
m
IMO, the key is to consider your build logic like production code. Keep APIs clean, do not duplicate too much and you're good to go.
👍 3
Bonus points for build and configuration cache (and project isolation soon)
c
Everything here uses the Kotlin DSL with KMP, including MavenCentral publishing. No Spring, though. https://gitlab.com/opensavvy