Migrate to Gradle DSL as a build tool by Pazus · Pull Request #73 · utPLSQL/utPLSQL-java-api
Repository navigation
Migrate to Gradle DSL as a build tool - #73
Merged
Pazus merged 16 commits into develop from gradle-dsl-migration Feb 22, 2019
Merged
Migrate to Gradle DSL as a build tool #73 Pazus merged 16 commits into develop from gradle-dsl-migration
Conversation
Pazus commented Feb 17, 2019 · edited Loading
Copy link Copy Markdown
Member
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.
Pazus requested review from jgebal , pesse and viniciusam February 17, 2019 09:52
gradle kotlin DSL migration
1f34cd6
Pazus
force-pushed
the
gradle-dsl-migration
branch
from
9ae8c88 to
1f34cd6
Compare
February 17, 2019 13:13
separated integration tests, updated CONTRIBUTING.md
df4b726
Pazus commented Feb 17, 2019
Copy link Copy Markdown
Member
Author
|
I'll leave pom.xml until the PR is approved so you can compare. I'm going to remove it before merging. |
collapse Coverage resources tasks
f0c3ea9
Pazus
commented
Feb 17, 2019
View reviewed changes
Comment thread gradlew
| @@ -0,0 +1,172 @@ | ||
| #!/usr/bin/env sh |
View reviewed changes
Comment thread gradlew.bat
| @@ -0,0 +1,84 @@ | ||
| @if "%DEBUG%" == "" @echo off |
View reviewed changes
viniciusam left a comment
Copy link Copy Markdown
Member
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?
Pazus added 5 commits February 19, 2019 07:26
Update CONTRIBUTING.md
59d69cc
remove clean phase before publishing jar
a35f8a2
showStandardStreams = true
3d632dd
check if build speeds up
2bc1c16
check if build speeds up
1b7849c
Pazus commented Feb 19, 2019
Copy link Copy Markdown
Member
Author
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. |
narrow caches
9f28122
Revert "narrow caches"
431125e
This reverts commit 9f28122pesse approved these changes Feb 19, 2019
View reviewed changes
pesse left a comment
Copy link Copy Markdown
Member
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 ;)
Pazus added 6 commits February 20, 2019 07:45
debug
2dcb1b3
echo opts
4b6d291
Update .travis.yml
0214d77
clean up to initial state
20ad8bf
remove pom.xml file as project is not migrated to Gradle
5bc0d92
publish only on develop and tags
91a051f
Pazus
merged commit 1d4dc11
into
develop
Feb 22, 2019
Pazus
deleted the
gradle-dsl-migration
branch
February 22, 2019 05:10
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment