Open cdeszaq opened 8 years ago
💯 💯 💯 💯 💯 💯
@cdeszaq would love to work on this. Am I allowed to share some ideas / send PR (if external contributions are allowed for this specific ticket) ?
Right now I'm looking for some Fili implementor to pilot using gradle on their fili-derived project to figure out how difficult or easy it is to adapt the build process to it. Our chief gradle evangelist from the Core Team(@cdeszaq) moved and took a new job and has been fairly idle since then.
By all means feel free to take a stab at it / provide input. Our Gradle efforts are very nascent so anyone with experience (or desire to learn) is welcome.
As Mike said, I've been more checked out than originally planned, but I am watching from afar more than it may seem ;-)
I will say that one of the biggest hurdles will be to help the whole Fili community get up to speed with Gradle and be comfortable with it. So with that in mind, lots of comments and even links to documentation so that others can follow along, and to explain why a choice makes sense, would be a good idea.
On Aug 14, 2017, at 1:19 PM, michael-mclawhorn notifications@github.com wrote:
Right now I'm looking for some Fili implementor to pilot using gradle on their fili-derived project to figure out how difficult or easy it is to adapt the build process to it. Our chief gradle evangelist from the Core Team(@cdeszaq) moved and took a new job and has been fairly idle since then.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@michael-mclawhorn I'll try to provide non-biased Maven vs. Gradle comparison (followed by some examples / pitfalls / suggestions).
Gradle doesn't separate declarative bits from code, so builds descend rapidly into complex mess. Maven is boring but much more reliable
https://twitter.com/jodastephen/status/888364803416367104maven-publish
plugin):
-- Gradle 1.4 (released on Jan 28, 2013) https://docs.gradle.org/1.4/release-notes.html#the-new-‘maven-publish’-plugin
-- Gradle 4.1 (released on Aug 07, 2017, i.e. 4.5 years after 1.4) still lists same feature as incubating: https://docs.gradle.org/4.1/userguide/publishing_maven.htmlhttps://github.com/gradle/gradle/issues/1162
) Support consumption of Maven BOM nativelyjava-library
plugin (where convenient) in order to separate API from implementation:
-- https://docs.gradle.org/current/userguide/java_library_plugin.html https://github.com/SonarSource/sonarqube/pull/1730
https://github.com/eclipse/golo-lang/pull/300
https://github.com/spring-projects/spring-framework/pull/22
https://github.com/ehcache/ehcache3/pull/7
https://github.com/mockito/mockito/pull/641
)Stay tuned, pull request (first draft) is on the way.
As nice as Maven is, it's been a challenge to get it working the way we'd like and making it do more seems to be more painful than painless. So, to ease our pain (and hopefully get faster builds), we want to move to Grade.
The main reasons we're looking at switching are:
Speed.
Gradle is really good at only recompiling what it needs to, and while Maven can (in theory) do some of this, it's not nearly as good at it. Gradle, in general, has more flexibility (or at least more easily accessible mechanisms) around speeding up builds and determining dependencies.
Flexibility and Control
Gradle is much more easily flexible than Maven is. Not only are there a bunch of plugins out there for Gradle already, but Gradle also makes it very easy to write new plugins for richer flexibility, whereas Maven does not do the same. One of these big things that we're looking at for this is the ability to have multiple sets of tests for different categories of things. In particular, breaking out the Unit, Functional, and Integration tests as separate aspects.
General Scriptability
Gradle makes it much easier to do related build scripting, partly due to the way it views the world, as well as due to it's Groovy roots and the ease with which external processes can be managed. In particular, some of the things we're looking at are:
gradlew run
gradlew demo
Developer Friendliness
Gradle comes with
gradlew
, which is a wrapper script that will download the dependencies needed for a project to build / compile (on both Windows and *Nix environments), so that developers don't need to worry about having the right version of Gradle or other build dependencies installed. Gradle can handle that for us, which makes it easier to get up and going for those looking to extend Fili.Better Groovy Support
Maven's support for compiling both Java and Groovy in the same project is limited, rather clunky, and not super well supported. Not only has this caused some problems, but it's also made it more challenging to use Groovy-oriented tooling, like Code Narc (which is like CheckStyle for Groovy). Gradle, on the other hand, has multi-language support (especially Groovy and Java) as a 1st-class feature.