Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openrewrite/rewrite-java-dependencies
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.4.0
Choose a base ref
...
head repository: openrewrite/rewrite-java-dependencies
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jan 24, 2024

  1. [Auto] GitHub advisories as of 2024-01-24T1115 (#65)

    Co-authored-by: timtebeek <timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Jan 24, 2024
    Copy the full SHA
    dcc9dbe View commit details
  2. Copy the full SHA
    a428eff View commit details

Commits on Jan 31, 2024

  1. [Auto] GitHub advisories as of 2024-01-31T1113 (#67)

    Co-authored-by: timtebeek <timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Jan 31, 2024
    Copy the full SHA
    9db625c View commit details

Commits on Feb 1, 2024

  1. chore(ci): bump peter-evans/create-pull-request from 5 to 6 (#68)

    Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6.
    - [Release notes](https://github.com/peter-evans/create-pull-request/releases)
    - [Commits](peter-evans/create-pull-request@v5...v6)
    
    ---
    updated-dependencies:
    - dependency-name: peter-evans/create-pull-request
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 1, 2024
    Copy the full SHA
    7036766 View commit details

Commits on Feb 2, 2024

  1. Copy the full SHA
    38cc7a1 View commit details
  2. refactor: Use of @EqualsAndHashCode on Recipe

    2 people authored and app committed Feb 2, 2024
    Copy the full SHA
    ff27eb6 View commit details
  3. Copy the full SHA
    272f70d View commit details

Commits on Feb 3, 2024

  1. refactor: Update Gradle wrapper

    Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.gradle.UpdateGradleWrapper?organizationId=T3BlblJld3JpdGU%3D
    
    Co-authored-by: Moderne <team@moderne.io>
    2 people authored and app committed Feb 3, 2024
    Copy the full SHA
    dc8e7f5 View commit details

Commits on Feb 5, 2024

  1. Copy the full SHA
    8de84c7 View commit details
  2. Copy the full SHA
    8c0aa31 View commit details

Commits on Feb 6, 2024

  1. Update DependencyInsight.java (#69)

    Fix a minor spelling and space issue.
    mike-solomon authored Feb 6, 2024
    Copy the full SHA
    c512419 View commit details
  2. refactor: OpenRewrite best practices

    Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.OpenRewriteBestPractices?organizationId=T3BlblJld3JpdGU%3D
    
    Co-authored-by: Moderne <team@moderne.io>
    2 people authored and app committed Feb 6, 2024
    Copy the full SHA
    223d1ec View commit details
  3. refactor: Automatically review pull requests

    Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/bJzRxFymE?organizationId=T3BlblJld3JpdGU%3D
    
    Co-authored-by: Moderne <team@moderne.io>
    2 people authored and app committed Feb 6, 2024
    Copy the full SHA
    a8206ac View commit details

Commits on Feb 7, 2024

  1. [Auto] GitHub advisories as of 2024-02-07T1113 (#70)

    Co-authored-by: timtebeek <1027334+timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Feb 7, 2024
    Copy the full SHA
    d3ce49b View commit details
  2. refactor: Automatically review pull requests

    Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/OUSuHnCME?organizationId=T3BlblJld3JpdGU%3D
    
    Co-authored-by: Moderne <team@moderne.io>
    2 people authored and app committed Feb 7, 2024
    Copy the full SHA
    741ad93 View commit details
  3. Copy the full SHA
    f0b1b06 View commit details

Commits on Feb 9, 2024

  1. Copy the full SHA
    a87c332 View commit details

Commits on Feb 14, 2024

  1. [Auto] GitHub advisories as of 2024-02-14T1114 (#72)

    Co-authored-by: timtebeek <1027334+timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Feb 14, 2024
    Copy the full SHA
    8092228 View commit details

Commits on Feb 20, 2024

  1. org.openrewrite.gradle.Assertions#withToolingModel moved to `org.op…

    …enrewrite.gradle.toolingapi.Assertions` (#73)
    
    * `org.openrewrite.gradle.Assertions#withToolingModel` moved to `org.openrewrite.gradle.toolingapi.Assertions`
    
    Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.ChangeMethodTargetToStatic?organizationId=T3BlblJld3JpdGU%3D
    
    Co-authored-by: Moderne <team@moderne.io>
    
    * Use `testImplementation` for `org.openrewrite.gradle.tooling:model`
    
    ---------
    
    Co-authored-by: Moderne <team@moderne.io>
    Co-authored-by: Tim te Beek <tim@moderne.io>
    3 people authored Feb 20, 2024
    Copy the full SHA
    e22efc2 View commit details
  2. Copy the full SHA
    5106afc View commit details

Commits on Feb 21, 2024

  1. [Auto] GitHub advisories as of 2024-02-21T1112 (#74)

    Co-authored-by: timtebeek <1027334+timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Feb 21, 2024
    Copy the full SHA
    faac5b1 View commit details

Commits on Feb 25, 2024

  1. Copy the full SHA
    bc06dfc View commit details

Commits on Feb 28, 2024

  1. Copy the full SHA
    a58ad0c View commit details
  2. [Auto] GitHub advisories as of 2024-02-28T1114 (#76)

    Co-authored-by: timtebeek <1027334+timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Feb 28, 2024
    Copy the full SHA
    cff5136 View commit details
  3. refactor: Add concurrency group to automated code reviews

    Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/uQki1Qy59?organizationId=T3BlblJld3JpdGU%3D
    
    Co-authored-by: Moderne <team@moderne.io>
    2 people authored and app committed Feb 28, 2024
    Copy the full SHA
    1aa59fe View commit details
  4. refactor: Remove token from automated code reviews

    Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/GoAESmXCQ?organizationId=NTdlNDAzNjYtNmJkOC00MzNjLWJmMDQtMGI2MWRkZTEyYzg5
    
    Co-authored-by: Moderne <team@moderne.io>
    2 people authored and app committed Feb 28, 2024
    Copy the full SHA
    f7edab1 View commit details
  5. Copy the full SHA
    e1df49d View commit details

Commits on Feb 29, 2024

  1. Copy the full SHA
    ee3e61a View commit details
  2. Enable the upgrade of transitive dependencies in Gradle builds.

    Also record any fixes into CommitMessage markers.
    sambsnyd committed Feb 29, 2024
    Copy the full SHA
    d2f08ad View commit details
  3. refactor: Upgrade Develocity (#77)

    * refactor: Upgrade Develocity
    
    Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/Zb7BQc324?organizationId=NTUyM2Y5NWYtN2RjMC00Y2FiLWJmMmYtMmY2MmMzNjU1OWQz
    
    Co-authored-by: Moderne <team@moderne.io>
    
    * Adopt access key
    
    ---------
    
    Co-authored-by: Moderne <team@moderne.io>
    timtebeek and TeamModerne authored Feb 29, 2024
    Copy the full SHA
    c89449d View commit details

Commits on Mar 4, 2024

  1. Copy the full SHA
    17c87b9 View commit details

Commits on Mar 6, 2024

  1. [Auto] GitHub advisories as of 2024-03-06T1113 (#78)

    Co-authored-by: timtebeek <1027334+timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Mar 6, 2024
    Copy the full SHA
    d077545 View commit details

Commits on Mar 7, 2024

  1. Copy the full SHA
    cfc7052 View commit details

Commits on Mar 11, 2024

  1. Copy the full SHA
    540e6ae View commit details

Commits on Mar 13, 2024

  1. [Auto] GitHub advisories as of 2024-03-13T1115 (#79)

    Co-authored-by: timtebeek <1027334+timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Mar 13, 2024
    Copy the full SHA
    9356f38 View commit details
  2. Copy the full SHA
    3390850 View commit details
  3. Update DependencyVulnerabilityCheckTest.gradle() now that I've fixed …

    …UpgradeDependencyVersion to be able to update the dependency version in that scenario.
    sambsnyd committed Mar 13, 2024
    Copy the full SHA
    daf2340 View commit details

Commits on Mar 14, 2024

  1. Polish

    sambsnyd committed Mar 14, 2024
    Copy the full SHA
    13268e4 View commit details
  2. Copy the full SHA
    c62e78e View commit details

Commits on Mar 15, 2024

  1. Parse advisories on Monday

    Ensures they make it in on repave Tuesday/Wednesday
    timtebeek authored Mar 15, 2024
    Copy the full SHA
    0735359 View commit details

Commits on Mar 16, 2024

  1. Enable DependencyVulnerabilityCheck to manage the versions of transit…

    …ive maven dependencies.
    sambsnyd committed Mar 16, 2024
    Copy the full SHA
    39019a9 View commit details

Commits on Mar 18, 2024

  1. Copy the full SHA
    be6b26a View commit details

Commits on Mar 22, 2024

  1. Copy the full SHA
    a09105e View commit details

Commits on Apr 5, 2024

  1. Merge pull request #80 from openrewrite/advisories/2024-03-18T1115

    [Auto] GitHub advisories as of 2024-03-18T1115
    sambsnyd authored Apr 5, 2024
    Copy the full SHA
    5365491 View commit details
  2. Copy the full SHA
    7edc49f View commit details
  3. Merge pull request #85 from openrewrite/advisories/2024-04-05T2014

    [Auto] GitHub advisories as of 2024-04-05T2014
    sambsnyd authored Apr 5, 2024
    Copy the full SHA
    34aa622 View commit details

Commits on Apr 12, 2024

  1. Copy the full SHA
    2e3f39c View commit details
  2. Copy the full SHA
    e96a966 View commit details

Commits on Apr 14, 2024

  1. Copy the full SHA
    7bb2e94 View commit details

Commits on Apr 15, 2024

  1. [Auto] GitHub advisories as of 2024-04-15T1115 (#86)

    Co-authored-by: timtebeek <1027334+timtebeek@users.noreply.github.com>
    github-actions[bot] and timtebeek authored Apr 15, 2024
    Copy the full SHA
    d7e261d View commit details
Showing with 1,601 additions and 9,061 deletions.
  1. +9 −0 .editorconfig
  2. +0 −55 .github/workflows/advisories.yml
  3. +0 −2 .github/workflows/ci.yml
  4. +15 −0 .github/workflows/comment-pr.yml
  5. +14 −23 .github/workflows/migrations.yml
  6. +17 −0 .github/workflows/receive-pr.yml
  7. +4 −4 LICENSE
  8. +18 −2 README.md
  9. +12 −33 build.gradle.kts
  10. BIN gradle/wrapper/gradle-wrapper.jar
  11. +2 −2 gradle/wrapper/gradle-wrapper.properties
  12. +5 −3 gradlew
  13. +12 −10 gradlew.bat
  14. +0 −3 lombok.config
  15. +16 −21 settings.gradle.kts
  16. +65 −56 src/main/java/org/openrewrite/java/dependencies/AddDependency.java
  17. +45 −26 src/main/java/org/openrewrite/java/dependencies/ChangeDependency.java
  18. +25 −14 src/main/java/org/openrewrite/java/dependencies/DependencyInsight.java
  19. +0 −158 src/main/java/org/openrewrite/java/dependencies/DependencyLicenseCheck.java
  20. +96 −23 src/main/java/org/openrewrite/java/dependencies/DependencyList.java
  21. +2 −2 src/main/java/org/openrewrite/java/dependencies/DependencyResolutionDiagnostic.java
  22. +0 −444 src/main/java/org/openrewrite/java/dependencies/DependencyVulnerabilityCheck.java
  23. +4 −3 src/main/java/org/openrewrite/java/dependencies/RelocatedDependencyCheck.java
  24. +79 −28 src/main/java/org/openrewrite/java/dependencies/RemoveDependency.java
  25. +0 −62 src/main/java/org/openrewrite/java/dependencies/RemoveExpiredSuppressions.java
  26. +16 −15 src/main/java/org/openrewrite/java/dependencies/UpgradeDependencyVersion.java
  27. +152 −0 src/main/java/org/openrewrite/java/dependencies/UpgradeTransitiveDependencyVersion.java
  28. +0 −46 src/main/java/org/openrewrite/java/dependencies/Vulnerability.java
  29. +0 −137 src/main/java/org/openrewrite/java/dependencies/github/ParseAdvisories.java
  30. +0 −34 src/main/java/org/openrewrite/java/dependencies/github/advisories/Advisory.java
  31. +0 −31 src/main/java/org/openrewrite/java/dependencies/github/advisories/DatabaseSpecific.java
  32. +0 −55 src/main/java/org/openrewrite/java/dependencies/github/advisories/Range.java
  33. +13 −8 src/main/java/org/openrewrite/java/dependencies/internal/StaticVersionComparator.java
  34. +8 −21 src/main/java/org/openrewrite/java/dependencies/internal/VersionParser.java
  35. +6 −15 .../org/openrewrite/java/dependencies/{github/advisories/Affected.java → internal/package-info.java}
  36. +5 −1 src/main/java/org/openrewrite/java/dependencies/oldgroupids/Migration.java
  37. +5 −1 src/main/java/org/openrewrite/java/dependencies/oldgroupids/ParseDefinitionMigrations.java
  38. +2 −2 src/main/java/org/openrewrite/java/dependencies/package-info.java
  39. +197 −0 src/main/java/org/openrewrite/java/dependencies/search/FindMinimumDependencyVersion.java
  40. +6 −9 ...ava/org/openrewrite/java/dependencies/{github/advisories/Package.java → search/package-info.java}
  41. +4 −0 src/main/java/org/openrewrite/java/dependencies/table/DependencyListReport.java
  42. +0 −55 src/main/java/org/openrewrite/java/dependencies/table/LicenseReport.java
  43. +3 −1 src/main/java/org/openrewrite/java/dependencies/table/RelocatedDependencyReport.java
  44. +1 −1 src/main/java/org/openrewrite/java/dependencies/table/RepositoryAccessibilityReport.java
  45. +0 −78 src/main/java/org/openrewrite/java/dependencies/table/VulnerabilityReport.java
  46. +0 −16 src/main/resources/META-INF/rewrite/dependencies.yml
  47. +0 −6,842 src/main/resources/advisories.csv
  48. +46 −5 src/main/resources/migrations.csv
  49. +0 −65 src/test/advisories/github-reviewed/2023/07/GHSA-2cv5-qvq3-6276/GHSA-2cv5-qvq3-6276.json
  50. +0 −62 src/test/advisories/github-reviewed/2023/07/GHSA-2gpr-j5vj-wvh2/GHSA-2gpr-j5vj-wvh2.json
  51. +0 −5 src/test/java/org/openrewrite/java/dependencies/.editorconfig
  52. +24 −23 src/test/java/org/openrewrite/java/dependencies/AddDependencyTest.java
  53. +80 −14 src/test/java/org/openrewrite/java/dependencies/ChangeDependencyTest.java
  54. +9 −6 src/test/java/org/openrewrite/java/dependencies/DependencyInsightTest.java
  55. +0 −63 src/test/java/org/openrewrite/java/dependencies/DependencyLicenseCheckTest.java
  56. +135 −23 src/test/java/org/openrewrite/java/dependencies/DependencyListTest.java
  57. +87 −78 src/test/java/org/openrewrite/java/dependencies/DependencyResolutionDiagnosticTest.java
  58. +0 −220 src/test/java/org/openrewrite/java/dependencies/DependencyVulnerabilityCheckTest.java
  59. +2 −2 src/test/java/org/openrewrite/java/dependencies/RelocatedDependencyCheckTest.java
  60. +123 −11 src/test/java/org/openrewrite/java/dependencies/RemoveDependencyTest.java
  61. +0 −78 src/test/java/org/openrewrite/java/dependencies/RemoveExpiredSuppressionsTest.java
  62. +6 −6 src/test/java/org/openrewrite/java/dependencies/UpgradeDependencyVersionTest.java
  63. +0 −38 src/test/java/org/openrewrite/java/dependencies/github/ParseAdvisoriesTest.java
  64. +1 −1 src/test/java/org/openrewrite/java/dependencies/oldgroupids/ParseDefinitionMigrationsTest.java
  65. +230 −0 src/test/java/org/openrewrite/java/dependencies/search/FindMinimumDependencyVersionTest.java
  66. +0 −19 suppressions.xml
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
insert_final_newline = true
trim_trailing_whitespace = true

[src/test*/java/**.java]
indent_size = 4
ij_continuation_indent_size = 2
55 changes: 0 additions & 55 deletions .github/workflows/advisories.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -23,8 +23,6 @@ jobs:
uses: openrewrite/gh-automation/.github/workflows/ci-gradle.yml@main
secrets:
gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
gradle_enterprise_cache_username: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
gradle_enterprise_cache_password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
ossrh_username: ${{ secrets.OSSRH_USERNAME }}
ossrh_token: ${{ secrets.OSSRH_TOKEN }}
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
15 changes: 15 additions & 0 deletions .github/workflows/comment-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: comment-pr

# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
on:
workflow_run:
workflows: ["receive-pr"]
types:
- completed

# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# Since this pull request has write permissions on the target repo, we should **NOT** execute any untrusted code.
jobs:
post-suggestions:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: openrewrite/gh-automation/.github/workflows/comment-pr.yml@main
37 changes: 14 additions & 23 deletions .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
@@ -4,24 +4,23 @@ name: Update the Old GroupId migrations CSV
on:
workflow_dispatch: {}
schedule:
- cron: 0 11 * * WED
- cron: 0 10 * * MON

jobs:
update-migrations:
if: github.event_name != 'schedule' || github.repository_owner == 'openrewrite'
runs-on: ubuntu-latest
steps:
# Checkout and build parser
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
cache: 'gradle'
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run build with Gradle Wrapper
run: ./gradlew build deps

# Update migrations
- name: Checkout oga-maven-plugin
@@ -30,24 +29,16 @@ jobs:
repository: jonathanlermitage/oga-maven-plugin
path: oga-maven-plugin
- name: Update migrations
run: java -classpath "build/deps/*:build/libs/*" org.openrewrite.java.dependencies.oldgroupids.ParseDefinitionMigrations oga-maven-plugin src/main/resources/migrations.csv
run: ./gradlew parseDefinitionMigrations --args="./oga-maven-plugin src/main/resources/migrations.csv"

# Create pull request
- name: Timestamp
# Commit and push
- name: configure-git-user
run: |
git config user.email "team@moderne.io"
git config user.name "team-moderne[bot]"
- name: Create timestamp
run: echo "NOW=$(date +'%Y-%m-%dT%H%M')" >> $GITHUB_ENV
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
base: main
branch: migrations/${{ env.NOW }}
title: "[Auto] Old GroupId migrations as of ${{ env.NOW }}"
body: |
[Auto] Old GroupId migrations as of ${{ env.NOW }}.
commit-message: "[Auto] Old GroupId migrations as of ${{ env.NOW }}"
labels: enhancement
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
- name: Commit and push
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
git add src/main/resources/migrations.csv
git diff --quiet HEAD || (git commit -m "[Auto] Old GroupId migrations as of ${{ env.NOW }}" && git push origin main)
17 changes: 17 additions & 0 deletions .github/workflows/receive-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: receive-pr

on:
pull_request:
types: [opened, synchronize]
branches:
- main

concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: true

# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# Since this pull request receives untrusted code, we should **NOT** have any secrets in the environment.
jobs:
upload-patch:
uses: openrewrite/gh-automation/.github/workflows/receive-pr.yml@main
8 changes: 4 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

@@ -178,15 +178,15 @@ Apache License
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file formatPrefix. We also recommend that a
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
![Logo](https://github.com/openrewrite/rewrite/raw/main/doc/logo-oss.png)
### Manage Java dependencies. Automatically.
<p align="center">
<a href="https://docs.openrewrite.org">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/openrewrite/rewrite/raw/main/doc/logo-oss-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/openrewrite/rewrite/raw/main/doc/logo-oss-light.svg">
<img alt="OpenRewrite Logo" src="https://github.com/openrewrite/rewrite/raw/main/doc/logo-oss-light.svg" width='600px'>
</picture>
</a>
</p>

<div align="center">
<h1>rewrite-java-dependencies</h1>
</div>

<div align="center">

<!-- Keep the gap above this line, otherwise they won't render correctly! -->
[![ci](https://github.com/openrewrite/rewrite-java-dependencies/actions/workflows/ci.yml/badge.svg)](https://github.com/openrewrite/rewrite-java-dependencies/actions/workflows/ci.yml)
[![Apache 2.0](https://img.shields.io/github/license/openrewrite/rewrite-java-dependencies.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/org.openrewrite.recipe/rewrite-java-dependencies.svg)](https://mvnrepository.com/artifact/org.openrewrite.recipe/rewrite-java-dependencies)
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.openrewrite.org/scans)
[![Contributing Guide](https://img.shields.io/badge/Contributing-Guide-informational)](https://github.com/openrewrite/.github/blob/main/CONTRIBUTING.md)
</div>

### What is this?

45 changes: 12 additions & 33 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -5,54 +5,33 @@ plugins {
group = "org.openrewrite.recipe"
description = "A rewrite module automating Java dependency management."

repositories {
maven {
url = uri("https://repo.gradle.org/gradle/libs-releases/")
content {
excludeVersionByRegex(".+", ".+", ".+-rc-?[0-9]*")
}
}
// Needed to pick up snapshot versions of rewrite
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}

val rewriteVersion = rewriteRecipe.rewriteVersion.get()
dependencies {
implementation(platform("org.openrewrite:rewrite-bom:$rewriteVersion"))
implementation("org.openrewrite:rewrite-maven")
// temporarily use SNAPSHOT version to release, to be changed back
implementation("org.openrewrite:rewrite-gradle")
implementation("org.openrewrite:rewrite-groovy")
runtimeOnly("org.openrewrite:rewrite-java-8")
runtimeOnly("org.openrewrite:rewrite-java-11")
runtimeOnly("org.openrewrite:rewrite-java-17")

testRuntimeOnly("org.openrewrite:rewrite-java-8")
testRuntimeOnly("org.openrewrite:rewrite-java-11")
testRuntimeOnly("org.openrewrite:rewrite-java-17")
testRuntimeOnly("org.projectlombok:lombok:latest.release")

implementation("org.openrewrite.gradle.tooling:model:${rewriteVersion}")

implementation("com.google.guava:guava:latest.release")
runtimeOnly("org.openrewrite:rewrite-java-17")

implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-csv")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")

testRuntimeOnly("org.gradle:gradle-tooling-api:latest.release")
compileOnly("org.projectlombok:lombok:latest.release")
annotationProcessor("org.projectlombok:lombok:latest.release")
testImplementation("org.openrewrite:rewrite-test")
testImplementation("org.openrewrite.gradle.tooling:model:${rewriteVersion}")
testImplementation(gradleApi())
testRuntimeOnly("com.google.guava:guava:latest.release")
testRuntimeOnly("ch.qos.logback:logback-classic:1.2.+")

testImplementation("org.assertj:assertj-core:3.24.+")
}

tasks {
val deps by registering(Copy::class) {
from(configurations.runtimeClasspath)
into("build/deps")
// ./gradlew parseDefinitionMigrations --args="./oga-maven-plugin src/main/resources/migrations.csv"
val parseDefinitionMigrations by registering(JavaExec::class) {
group = "generate"
description = "Parse oga-maven-plugin and generate a CSV file."
mainClass = "org.openrewrite.java.dependencies.oldgroupids.ParseDefinitionMigrations"
classpath = sourceSets.getByName("main").runtimeClasspath
}
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
8 changes: 5 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -203,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
22 changes: 12 additions & 10 deletions gradlew.bat
100644 → 100755
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

3 changes: 0 additions & 3 deletions lombok.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# https://projectlombok.org/features/configuration
config.stopBubbling = true
lombok.addNullAnnotations = CUSTOM:org.openrewrite.internal.lang.NonNull:org.openrewrite.internal.lang.Nullable
lombok.copyableAnnotations += org.openrewrite.internal.lang.Nullable
lombok.copyableAnnotations += org.openrewrite.internal.lang.NonNull
lombok.anyConstructor.addConstructorProperties=true
Loading