palantir / gradle-consistent-versions

Compact, constraint-friendly lockfiles for your dependencies
Apache License 2.0
117 stars 14 forks source link

Plugin to create a maven repo list in the .ideas folder #1233

Closed FinlayRJW closed 1 month ago

FinlayRJW commented 2 months ago

Before this PR

Had no way of generating a list of repos for the intellij version props plugin to use

After this PR

We can now use this plugin to generate the repo list

Possible downsides?

This will create the list even if you are not using the intellij plugin

Had to bump minimum gradle version to 7.6.4 this means 7.2 is no longer supported

changelog-app[bot] commented 2 months ago

Generate changelog in changelog-dir>`changelog/@unreleased`</changelog-dir

What do the change types mean? - `feature`: A new feature of the service. - `improvement`: An incremental improvement in the functionality or operation of the service. - `fix`: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way. - `break`: Has the potential to break consumers of this service's API, inclusive of both Palantir services and external consumers of the service's API (e.g. customer-written software or integrations). - `deprecation`: Advertises the intention to remove service functionality without any change to the operation of the service itself. - `manualTask`: Requires the possibility of manual intervention (running a script, eyeballing configuration, performing database surgery, ...) at the time of upgrade for it to succeed. - `migration`: A fully automatic upgrade migration task with no engineer input required. _Note: only one type should be chosen._
How are new versions calculated? - ❗The `break` and `manual task` changelog types will result in a major release! - 🐛 The `fix` changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease. - ✨ All others will result in a minor version release.

Type

- [x] Feature - [ ] Improvement - [ ] Fix - [ ] Break - [ ] Deprecation - [ ] Manual task - [ ] Migration

Description

Plugin to create a maven repo list in the .ideas folder **Check the box to generate changelog(s)** - [x] Generate changelog entry
felixdesouza commented 2 months ago

An aside, and not a blocker, but I'm curious about making use of the Tooling API here / with intellij-gradle integration generally. From what I've understood, a gradle plugin (or init script, how intellij does it), can register a ToolingModelBuilder that will build a model that can then be queried later on within something like IntelliJ. This is how IntelliJ does it to get the projects, dependencies and a bunch of other pieces.

Thoughts @CRogers

FinlayRJW commented 1 month ago

for some reason adding implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' has broken a lot of tests due to

.gradle-test-kit/caches/jars-9/507792a4bf4466b62991b4bdf628dc95/jackson-core-2.17.2.jar.
    at org.gradle.internal.classpath.ClasspathBuilder.jar(ClasspathBuilder.java:55)
    at org.gradle.internal.classpath.InstrumentingClasspathFileTransformer.instrument(InstrumentingClasspathFileTransformer.java:137)
    at org.gradle.internal.classpath.InstrumentingClasspathFileTransformer.transform(InstrumentingClasspathFileTransformer.java:132)
    at org.gradle.internal.classpath.InstrumentingClasspathFileTransformer.transform(InstrumentingClasspathFileTransformer.java:96)
    at org.gradle.internal.classpath.DefaultCachedClasspathTransformer.transformFile(DefaultCachedClasspathTransformer.java:193)
    at org.gradle.internal.classpath.DefaultCachedClasspathTransformer.lambda$cachedFile$6(DefaultCachedClasspathTransformer.java:186)
    at org.gradle.internal.UncheckedException.unchecked(UncheckedException.java:74)
    at org.gradle.internal.classpath.DefaultCachedClasspathTransformer.lambda$transformAll$9(DefaultCachedClasspathTransformer.java:236)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65
FinlayRJW commented 1 month ago

I've had to make this run afterEvaluate to ensure that the repos are correctly collected is there an earlier point this could be run?

FinlayRJW commented 1 month ago

I have now moved this to be run in a task so it is no longer anything todo with the plugin settings

CRogers commented 1 month ago

Looks good given the comments.

autorelease3[bot] commented 1 month ago

Released 2.26.0