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

Update sortpom plugin to newest version #1675

Merged
merged 6 commits into from
May 16, 2023

Conversation

snowe2010
Copy link
Contributor

Update the sortpom plugin to add sortDependencyManagement element.

Remove dependency on IOUtils

Please DO NOT FORCE PUSH. Don't worry about messy history, it's easier to do code review if we can tell what happened after the review, and force pushing breaks that.

Please make sure that your PR allows edits from maintainers. Sometimes its faster for us to just fix something than it is to describe how to fix it.

Allow edits from maintainers

After creating the PR, please add a commit that adds a bullet-point under the [Unreleased] section of CHANGES.md, plugin-gradle/CHANGES.md, and plugin-maven/CHANGES.md which includes:

  • a summary of the change
  • either
    • a link to the issue you are resolving (for small changes)
    • a link to the PR you just created (for big changes likely to have discussion)

If your change only affects a build plugin, and not the lib, then you only need to update the plugin-foo/CHANGES.md for that plugin.

If your change affects lib in an end-user-visible way (fixing a bug, updating a version) then you need to update CHANGES.md for both the lib and all build plugins. Users of a build plugin shouldn't have to refer to lib to see changes that affect them.

This makes it easier for the maintainers to quickly release your changes :)

Copy link
Member

@nedtwigg nedtwigg left a comment

Choose a reason for hiding this comment

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

This is great! I'm happy to merge this as-is, but this is probably a good time to make the version configurable. If you want to do that, I'd be happy to wait for the version parameter to get added.

If you don't care about a configurable version parameter then I'm happy to merge as-is. Just means that in the future you'll have to wait for a new Spotless even if all you want is a new sortpom.

@@ -3,6 +3,7 @@
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).

## [Unreleased]
* Update sortpom plugin to the newest version
Copy link
Member

Choose a reason for hiding this comment

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

## [Unreleased]
### Changes
* Bump default sortpom version to latest `3.0.0` -> `3.2.1`. ([#1675](https://github.com/diffplug/spotless/pull/1675))

Copy link
Member

Choose a reason for hiding this comment

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

Use default if the version becomes configurable, remove default` if the version stays fixed.

@snowe2010
Copy link
Contributor Author

I'll gladly make it configurable. Do you have a different plugin you can point me at that does that already? And I'll push a fix for that changelog real quick too.

@snowe2010
Copy link
Contributor Author

Ah, I was looking at the GoogleJavaFormatStep, but it seemed to work quite differently than the SortPomStep. Ktfmt looks much closer. And I actually use that one so that's good to read over anyway.

@snowe2010
Copy link
Contributor Author

Is there an architecture guide for how to build steps and tests? It seems like they are all built quite differently (which makes sense, if they were built at different times), but I don't want to build the 'old' way if there is such a thing.

@snowe2010
Copy link
Contributor Author

@nedtwigg ok, updated! Hopefully I did that right. I tested locally on my own projects and it seems to work correctly, though I don't really know what I'm doing. 🤷🏼 The other Steps seem to complicate stuff with default versions, etc. I just stuck that on the Cfg object because it seemed like other defaults were there already. If that's not appropriate just let me know!

@snowe2010
Copy link
Contributor Author

@nedtwigg Do I need to do anything else to get this merged? I don't want to miss anything.

@snowe2010
Copy link
Contributor Author

@nedtwigg agh. I just realized I pushed with my work email. Your contribution guidelines say to not force push. Is it ok if I force push to rewrite my commit email?

@nedtwigg
Copy link
Member

Go for it!

@snowe2010 snowe2010 force-pushed the feature/update-sortpom branch from 7e72de9 to 401f28d Compare April 18, 2023 21:21
@snowe2010
Copy link
Contributor Author

@nedtwigg done!

Update the sortpom plugin to add sortDependencyManagement
element.

Remove dependency on IOUtils
Add test for version config
Update SortPomTest to use ResourceHarness
@snowe2010 snowe2010 force-pushed the feature/update-sortpom branch from 401f28d to e686e4f Compare April 18, 2023 22:09
@snowe2010 snowe2010 requested a review from nedtwigg April 24, 2023 16:39
Copy link
Member

@nedtwigg nedtwigg left a comment

Choose a reason for hiding this comment

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

Thanks for the great PR, sorry I was so slow to merge.

@nedtwigg nedtwigg merged commit f631f09 into diffplug:main May 16, 2023
@snowe2010
Copy link
Contributor Author

No worries! Thank you very much!

@snowe2010 snowe2010 deleted the feature/update-sortpom branch May 17, 2023 17:45
@snowe2010
Copy link
Contributor Author

@nedtwigg when do releases usually go out? is it a monthly thing?

@nedtwigg
Copy link
Member

I'll cut a release tonight or tomorrow. It's not a fixed schedule - I try to get new features published right away, and I usually let minor things sit around until there's a bigger feature that needs to get published. Sorry for the big delay this time, had a tough month so Spotless got neglected a bit.

@snowe2010
Copy link
Contributor Author

Absolutely no worries dude. I built it locally and deployed it to our nexus repo so we haven't been blocked on it. Take your time! And thank you for the hard work!

@nedtwigg
Copy link
Member

Released (finally!!) in plugin-gradle 6.19.0 and plugin-maven 2.37.0.

@snowe2010
Copy link
Contributor Author

Thank you so much!

benkard pushed a commit to benkard/mulkcms2 that referenced this pull request Aug 29, 2023
This MR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless) | build | minor | `2.38.0` -> `2.39.0` |
| [io.quarkus:quarkus-maven-plugin](https://github.com/quarkusio/quarkus) | build | patch | `3.3.0` -> `3.3.1` |
| [io.quarkus:quarkus-universe-bom](https://github.com/quarkusio/quarkus-platform) | import | patch | `3.3.0` -> `3.3.1` |

---

### Release Notes

<details>
<summary>diffplug/spotless</summary>

### [`v2.39.0`](https://github.com/diffplug/spotless/blob/HEAD/CHANGES.md#&#8203;2390---2023-05-24)

##### Added

-   `Jvm.Support` now accepts `-SNAPSHOT` versions, treated as the non`-SNAPSHOT`. ([#&#8203;1583](diffplug/spotless#1583))
-   Support Rome as a formatter for JavaScript and TypeScript code. Adds a new `rome` step to `javascript` and `typescript` formatter configurations. ([#&#8203;1663](diffplug/spotless#1663))
-   Add semantics-aware Java import ordering (i.e. sort by package, then class, then member). ([#&#8203;522](diffplug/spotless#522))

##### Fixed

-   Fixed a regression which changed the import sorting order in `googleJavaFormat` introduced in `2.38.0`. ([#&#8203;1680](diffplug/spotless#1680))
-   Equo-based formatters now work on platforms unsupported by Eclipse such as PowerPC (fixes [durian-swt#&#8203;20](diffplug/durian-swt#20))
-   When P2 download fails, indicate the responsible formatter. ([#&#8203;1698](diffplug/spotless#1698))

##### Changes

-   Equo-based formatters now download metadata to `~/.m2/repository/dev/equo/p2-data` rather than `~/.equo`, and for CI machines without a home directory the p2 data goes to `$GRADLE_USER_HOME/caches/p2-data`. ([#&#8203;1714](diffplug/spotless#1714))
-   Bump default `googleJavaFormat` version to latest `1.16.0` -> `1.17.0`. ([#&#8203;1710](diffplug/spotless#1710))
-   Bump default `ktfmt` version to latest `0.43` -> `0.44`. ([#&#8203;1691](diffplug/spotless#1691))
-   Bump default `ktlint` version to latest `0.48.2` -> `0.49.1`. ([#&#8203;1696](diffplug/spotless#1696))
    -   Dropped support for `ktlint 0.46.x` following our policy of supporting two breaking changes at a time.
-   Bump default `sortpom` version to latest `3.0.0` -> `3.2.1`. ([#&#8203;1675](diffplug/spotless#1675))

</details>

<details>
<summary>quarkusio/quarkus</summary>

### [`v3.3.1`](quarkusio/quarkus@3.3.0...3.3.1)

[Compare Source](quarkusio/quarkus@3.3.0...3.3.1)

</details>

<details>
<summary>quarkusio/quarkus-platform</summary>

### [`v3.3.1`](quarkusio/quarkus-platform@3.3.0...3.3.1)

[Compare Source](quarkusio/quarkus-platform@3.3.0...3.3.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

👻 **Immortal**: This MR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4yNC4wIiwidXBkYXRlZEluVmVyIjoiMzQuMjQuMCJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants