10 ms·
> Maven is virtually infinite extensibility via plugins Losing the only task of a build tool, caching and parallelization. No, the problem is that maven doesn
by kaba0 2y ago
> Maven is virtually infinite extensibility via plugins
Losing the only task of a build tool, caching and parallelization.
No, the problem is that maven doesn’t rebuild everything. It is actually quite common in code bases that I had to run clean build instead of build to actually recompile everything that changed. I guess maven just doesn’t have an accurate build graph?
> LOL, from my experience that is not true
In what way is it not true?
Also, gradle is demonstrably faster, especially on projects that can be parallelized. Obviously a hello world will be dominated by javac and build tool startup speed so it’s not relevant.
And multiple daemons — you can disable them, and they will go away if unused.
- ktosobcy 2y ago> Losing the only task of a build tool, caching and parallelization. You are aware that Maven does offer paralle build, right? > I guess maven just doesn’t have an accurate build graph? You guess wrong? then >> LOL, from my experience that is not true > In what way is it not true? Consistency of gradle build. You yourself stated just a paragraph above that sometimes you have to run "clean" xD > Also, gradle is demonstrably faster, especially on projects that can be parallelized. Obviously a hello world will be dominated by javac and build tool startup speed so it’s not relevant. Again, learn the tool. Maven does offer parallel builds and is comparably fast… > And multiple daemons — you can disable them, and they will go away if unused. "but you are turning off the only feature of a build!!!" Also - I had a setup open with gradle/kotlin-multiplatform project (shell with "gradlew" and Android Studio) and magically it fails to build with "Unresolved reference: kotlinx" even though I haven't done anything to the project and no ammount of running "gradlew clean" solves it... what a lovely tool....
- kaba0 2y ago> Consistency of gradle build. You yourself stated just a paragraph above that sometimes you have to run "clean" xD That was in reference to maven.. Also, feel free to show me any benchmark showing maven being as fast as gradle. https://gradle.org/gradle-vs-maven-performance/ https://gradle.org/gradle-vs-maven-performance/
- ktosobcy 2y ago> Also, feel free to show me any benchmark showing maven being as fast as gradle. https://gradle.org/gradle-vs-maven-performance/ https://gradle.org/gradle-vs-maven-performance/ I tried and * commons took more than 2,5 minutes to build (they show 70s?) * tried their tests (medium project, https://github.com/gradle/performance-comparisons/tree/master/single-medium-project https://github.com/gradle/performance-comparisons/tree/maste...) and maven compiled it in 4s and usual "clean install" took 14s but they don't enable paralel test run); then I tried running "gradle build" and... got an error: ``` FAILURE: Build failed with an exception. * Where: Build file '/Users/wojtek/dev/tmps/performance-comparisons/single-medium-project/build.gradle' line: 16 * What went wrong: A problem occurred evaluating root project 'single-medium-project'. > Could not find method compile() for arguments [commons-lang:commons-lang:2.5] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. ``` It's so nice that even gradle team themselves can keep up with their crap xD but of course it's probably due to convoluted setup... again - with maven you just clone and build and be done with it, with gradle you have to "stand on your head" to figure how to make any progress... I updated the build.gradle (according to https://docs.gradle.org/current/userguide/declaring_dependencies.html https://docs.gradle.org/current/userguide/declaring_dependen...) and `gradle build` finished in 19s... So your beloved gradle is 25% slower and can't even be compatible with itself... I took a look at "large-multimodule" to have something more challenging but: they setup each project individually and for some convoluted reason configure maven compiler with `<source>1.5</source>` (and JDK21 complains) and same goes for gradle modules with broken `dependencies`. I adjusted it but then it turned out that the sources can't even compile (due to wrong arguments in tests) ffs...