-
Notifications
You must be signed in to change notification settings - Fork 5
Migrate to Gradle DSL as a build tool #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9ae8c88
to
1f34cd6
Compare
I'll leave pom.xml until the PR is approved so you can compare. I'm going to remove it before merging. |
@@ -0,0 +1,172 @@ | |||
#!/usr/bin/env sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generated file
@@ -0,0 +1,84 @@ | |||
@if "%DEBUG%" == "" @echo off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generated file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, looks good! Have you noticed any difference in the build time?
Thank you for the concerntion! It's actually a bit slower on CI, but I'll try to speed it up. Btw gradle is definitely much faster on your own machine while you develop as it heavily uses incremental builds and caches so it builds only needed things. On my machine the clean build takes 4s, second build - 1s. |
This reverts commit 9f28122
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I love this new approach! Never did it myself, but it's actually code, which you know I like waaaay more than XML configuration ;)
Migrate from Maven XML-based POM build configuration to static typed Gradle DSL (Uses Kotlin script facilities). The new version is much more readable and short. It’s quite easy to implement new features even the most custom one as we can use Kotlin to code anything we like right in the build file. Gradle is a modern widely used build tool which means there is only a small chance we have to write something custom. Anything that is possible with Maven can be reproduced with Gradle with (likely) fewer lines of code.
The main thing to understand is that Gradle build consists of “tasks” similar to Maven goals. You ask Gradle to execute a goal an it executes all required goals to execute the requested one. We can create new goals and introduce new dependencies if needed. Such approach is used to download Coverage resources.
I’ve made a small change to how we work with resources. I download it directly to the build directory so that sources don’t change on build as it’s a bad practice.
I also temporary added deployment of the snapshot to packagecloud for this branch to test it. Should be eliminated before merge.