GeezerVison is showing github.com — Migrate to Gradle DSL as a build tool by Pazus · Pull Request #73 · utPLSQL/utPLSQL-java-api
Conversation
Pazus
commented
Feb 17, 2019
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I'll leave pom.xml until the PR is approved so you can compare. I'm going to remove it before merging.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
@@ -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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
@@ -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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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 ;)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
jgebal
Awaiting requested review from jgebal
2 more reviewers
pesse
pesse approved these changes
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|