Skip to content
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

Bump to Gradle 7.2, polish build and upgrade plugins/libraries #2775

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

simonbasle
Copy link
Member

@simonbasle simonbasle commented Sep 17, 2021

This PR migrates to Gradle 7.2, and upgrades most plugins (ensuring compatibility with Gradle 7) and libraries.

As a result, some adjustments had to be made both to the build and to replace deprecated / removed APIs.

The only exception is Byte Buddy in reactor-tools, for which a migration path isn't simple and will be treated separately in a following PR.

  • Upgrade Gradle to 7.2
  • Extract more library versions in root project's ext rather than constants in strings (eg. dependencies of reactor-tools)
  • Upgrade most plugins to their latest version to ensure best compatibility with Gradle 7
  • Upgrade most libraries to ensure we're not lagging behind (paving the way in some cases for a JDK upgrade)
  • Polish the build
    • align a bit better with minor main changes
    • use actual Java version in messages rather than "9+"
    • don't require signing if publishing to MockRepository (in addition to MavenLocal exception)
  • Fix the codebase to address warnings and errors:
    • fix usages of Duration with awaitility
    • fix tests in reactor-test where AssertJ message slightly changed
    • use JavaPluginConvention instead of JavaPluginExtension in buildSrc
    • fix some Gradle deprecation warnings (eg. removed feature preview, mainClass)
    • fix xxxRuntime configurations => xxxRuntimeOnly
  • Fix subtle changes/regressions in the build result / improve detection of such cases:
    • fix exclude of reactor-tools shadowJar (and added a test)
    • catch cases where ArchUnit tests are not really run because classes couldn't be discovered

Here is a non-exhaustive list of upgrades for the most significant plugins and libraries:

  • kotlin from 1.3.72 to 1.5.31
  • shadow from 4.0.2 to 7.0.0 (along with attempt at simplified configuration)
  • test-sets from 3.0.0 to 4.0.0
  • bnd from 5.0.1 to 5.3.0
  • changed the jsr305Version name to findbugsVersion and set it to 3.0.1 (replicating a change in main)
  • JUnit from 5.6.0 to 5.8.0
  • AssertJ from 3.19.0 to 3.21.0 (included some minor breaking and behavior changes)
  • javaObjectLayout from 0.9 to 0.16
  • awaitility from 3.1.12 to 4.1.0 (use of JDK 8 Duration)

@simonbasle simonbasle added the type/chores A task not related to code (build, formatting, process, ...) label Sep 17, 2021
@simonbasle simonbasle added this to the 3.3.21.RELEASE milestone Sep 17, 2021
@simonbasle simonbasle requested a review from a team September 17, 2021 15:22
@simonbasle simonbasle self-assigned this Sep 17, 2021
@simonbasle simonbasle requested a review from a team as a code owner September 17, 2021 15:22
Copy link
Contributor

@OlegDokuka OlegDokuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

 - fix exclude of tools shadowJar + add more test
 - fix tests in reactor-test where assertj message slightly changed
 - fix gradle and updated libraries deprecation warnings
 - Don't require signature when publishing to local mock repo
@simonbasle simonbasle force-pushed the bumpGradle7andPlugins branch from 193aa05 to cb988ef Compare September 24, 2021 12:18
@simonbasle
Copy link
Member Author

rebased on top of latest 3.3.x and squashed into a single commit. I need to quickly verify the forward-merge locally before merging because I suspect it won't be trivial.

@simonbasle
Copy link
Member Author

Forward-merge needed a bit of adaptation for newly introduced ArchUnit test.

@simonbasle simonbasle merged commit d8cf061 into 3.3.x Sep 24, 2021
@reactorbot
Copy link

@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main 🙇

@simonbasle simonbasle deleted the bumpGradle7andPlugins branch September 24, 2021 13:11
simonbasle added a commit that referenced this pull request Sep 24, 2021
Amended TestBestPracticesArchTest to adapt to new ArchUnit version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chores A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants