GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Migrate to Gradle DSL as a build tool by Pazus · Pull Request #73 · utPLSQL/utPLSQL-java-api

Conversation

@Pazus

@Pazus Pazus commented Feb 17, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Pazus
Pazus requested review from jgebal, pesse and viniciusam February 17, 2019 09:52
@Pazus
gradle kotlin DSL migration
1f34cd6
@Pazus
Pazus force-pushed the gradle-dsl-migration branch from 9ae8c88 to 1f34cd6 Compare February 17, 2019 13:13
@Pazus
separated integration tests, updated CONTRIBUTING.md
df4b726
@Pazus

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Pazus
collapse Coverage resources tasks
f0c3ea9
Pazus
Pazus commented Feb 17, 2019
View reviewed changes
Comment thread gradlew
@@ -0,0 +1,172 @@
#!/usr/bin/env sh

@Pazus Pazus Feb 17, 2019

Copy link
Copy Markdown
Member Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Pazus
Pazus commented Feb 17, 2019
View reviewed changes
Comment thread gradlew.bat
@@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off

@Pazus Pazus Feb 17, 2019

Copy link
Copy Markdown
Member Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
viniciusam
viniciusam reviewed Feb 18, 2019
View reviewed changes

@viniciusam viniciusam left a comment

Copy link
Copy Markdown
Member

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.

All reactions
Comment thread CONTRIBUTING.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Pazus added 5 commits February 19, 2019 07:26
@Pazus
Update CONTRIBUTING.md
59d69cc
@Pazus
remove clean phase before publishing jar
a35f8a2
@Pazus
showStandardStreams = true
3d632dd
@Pazus
check if build speeds up
2bc1c16
@Pazus
check if build speeds up
1b7849c
@Pazus

Pazus commented Feb 19, 2019

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Pazus added 2 commits February 19, 2019 22:52
@Pazus
narrow caches
9f28122
@Pazus
Revert "narrow caches"
431125e
This reverts commit 9f28122
pesse
pesse approved these changes Feb 19, 2019
View reviewed changes

@pesse pesse left a comment

Copy link
Copy Markdown
Member

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.

All reactions
Pazus added 6 commits February 20, 2019 07:45
@Pazus
debug
2dcb1b3
@Pazus
echo opts
4b6d291
@Pazus
Update .travis.yml
0214d77
@Pazus
clean up to initial state
20ad8bf
@Pazus
remove pom.xml file as project is not migrated to Gradle
5bc0d92
@Pazus
publish only on develop and tags
91a051f
@Pazus
Pazus merged commit 1d4dc11 into develop Feb 22, 2019
@Pazus
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

Reviewers

@jgebal jgebal Awaiting requested review from jgebal
2 more reviewers
@viniciusam viniciusam viniciusam left review comments
@pesse 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

Labels

None yet

Projects

None yet

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.

3 participants

@Pazus @viniciusam @pesse
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.