gradle recommends having as much independent modules as possible in order to get the best of parallel build. but again you gotta know that to do so, most java projects i’ve seen do not follow that rule, worse if you use kotlin or scala, build time is a freaking nightmare. incremental build is fast but first builds are always expensive, even more if you you work with git worktrees a lot, and you do not setup your env properly you waste more time on builds than anything. and you gotta go through gradle docs that rarely anybody understand as this things breaks on any small little update
Scala's build time is slow because the actual compiler is slow af (scala is a hard language to compile). Kotlin always seemed reasonably fast, but aren't we digressing here? It sounds like you know the problems with your projects, but you're choosing not to fix them and hoping the jdk team magically fixes them for you?
first builds are always expensive
Like which step? Worktree-ing an existing project and building is pretty fast for us. Only dependency downloads take a lot of time if you're actually building something fresh (which can't really be avoided that easily).
>you gotta go through gradle docs that rarely anybody understand as this things breaks on any small little update
What are you doing that causes gradle updates to break you so hard? We've taken some of our projects from gradle 3 -> 8 through the course of 8 years and haven't struggled that much. Do you have a bunch of custom scripting or something?
i mean i know the issue, but refactoring a 3M lines of code of kotlin projects is not really what you could call a simple journey 🤣 but honestly, they could work on good defaults you know, the reason i’m complaining is really because i came from golang were builds takes literally fractions of seconds and coming to java was just way too painful. i’ve honestly not seen a single person that is happy with the state of build tools in java, that’s why new build systems like mill are emerging
What does this mean? Defaults for doing what? Is this a fundamental complaint that there's no first party build tool or is learning mvn init or gradle init really asking a lot?
The ecosystem is geared towards companies and long term maintenance, so companies typically create some maven archetypes or copy pasteable starter templates for their specific settings and projects anyway. I don't think the common use case is starting from a blank slate.
i mean i know the issue, but refactoring a 3M lines of code of kotlin projects is not really what you could call a simple journey
What is the issue and why do you have to refactor source code to get a normal build going? Or are your build scripts 3m lines because that sounds insane?
i’m complaining is really because i came from golang were builds takes literally fractions of seconds and coming to java was just way too painful
Generally speaking, most languages are slower at compiling than go since go hard optimizes for that specific benchmark, but java is pretty fast at compiling big projects. What part of your build is actually taking time? 3m lines of java code shouldn't be taking a long time (but yes, more than seconds).
View all comments
Show parent comment
0
u/Emotional-Priority33 4d ago
gradle recommends having as much independent modules as possible in order to get the best of parallel build. but again you gotta know that to do so, most java projects i’ve seen do not follow that rule, worse if you use kotlin or scala, build time is a freaking nightmare. incremental build is fast but first builds are always expensive, even more if you you work with git worktrees a lot, and you do not setup your env properly you waste more time on builds than anything. and you gotta go through gradle docs that rarely anybody understand as this things breaks on any small little update