what is the best way to find outdated dependencies...
# amper
c
what is the best way to find outdated dependencies in an amper project? Usually I use “com.github.ben-manes.versions” but that displays only errors in my amper project
l
I hope something like refreshVersions is made possible
c
I just need a pragmatic solution via gradle interop for now.
l
You mean something that already works? I don't see why Ben's plugin wouldn't work on an Amper project for now 🤔
c
l
That looks like a bug in the plugin. Did you look in their issue tracker?
c
a quick search showed nothing so I’m posting it here
a
Hi Christoph!
find outdated dependencies
Could you clarify, please, what problem do you want to solve? What is the criteria for you for the outdated dependency? How do you (or how would you like to) incorporate this into your development process? Thank you!
c
for gradle projects i use the benmanes versions plugin and it does not work with amper. i want a list of dependencies where a newer version exists. (or optionally a way to update to the newer versions, maybe like
pnpm update -i
)
but first step would be to fix the interop with the gradle plugin
a
fix the interop with the gradle plugin
By this, do you mean reporting the outdated dependencies from Amper yaml files?
c
no just track down why the “com.github.ben-manes.versions” plugin does not work with amper. I have a public project where you can reproduce it.
https://github.com/christophsturm/isolation-chamber <= just run ./gradlew dependencyUpdates there (or with --info to see the stacktraces)
a
just run ./gradlew dependencyUpdates there (or with --info to see the stacktraces)
This works fine for me
Copy code
Andrey-mbp:isolation-chamber Andrey$ ./gradlew dependencyUpdates
Picked up JAVA_TOOL_OPTIONS: -Dmy.java.tool.option=my.java.tool.option.value

Welcome to Gradle 8.7!

Here are the highlights of this release:
 - Compiling and testing with Java 22
 - Cacheable Groovy script compilation
 - New methods in lazy collection properties

For more details see <https://docs.gradle.org/8.7/release-notes.html>

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
WARN: Attempt to load key 'psi.sleep.in.validity.check' for not yet loaded registry
WARN: Attempt to load key 'psi.incremental.reparse.depth.limit' for not yet loaded registry

> Configure project :buildSrc
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.9.22` that might work differently than in the requested version `1.9.20`.

> Task :dependencyUpdates

------------------------------------------------------------
: Project Dependency Updates (report to plain text file)
------------------------------------------------------------

The following dependencies are using the latest milestone version:
 - org.jetbrains.kotlin:kotlin-build-tools-impl:1.9.20
 - org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.20
 - org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.9.20

Failed to determine the latest version for the following dependencies (use --info for details):
 - com.christophsturm.restaurant:restaurant-client
 - com.christophsturm.restaurant:restaurant-core
 - com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin
 - com.ongres.scram:client
 - dev.failgood:failgood
 - io.github.gradle-nexus.publish-plugin:io.github.gradle-nexus.publish-plugin.gradle.plugin
 - io.vertx:vertx-lang-kotlin-coroutines
 - io.vertx:vertx-pg-client
 - junit:junit
 - org.jboss.xnio:xnio-api
 - org.jboss.xnio:xnio-nio
 - org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable
 - org.jetbrains.kotlin:kotlin-serialization-compiler-plugin-embeddable
 - org.jetbrains.kotlin:kotlin-stdlib
     1.9.20
 - org.jetbrains.kotlin:kotlin-test
     1.9.20
 - org.jetbrains.kotlin:kotlin-test-junit
     1.9.20
 - org.jetbrains.kotlin:kotlin-test-junit5
     1.9.20
 - org.jetbrains.kotlinx:kotlinx-serialization-json
     1.5.1
 - org.junit.jupiter:junit-jupiter-api
 - org.junit.jupiter:junit-jupiter-engine

Gradle release-candidate updates:
 - Gradle: [8.7: UP-TO-DATE]

Generated report file build/dependencyUpdates/report.txt

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to <https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings> in the Gradle documentation.

BUILD SUCCESSFUL in 24s
11 actionable tasks: 2 executed, 9 up-to-date
c
yes, it says “failed to determine the latest version” for most of the dependencies
a
Ah. As I see at least some of these dependencies are written in Amper yaml files. I think this could cause
ben-manes.versions
plugin checks to fail
Actually, came across this thread that suggests that this is the issue with old XML parsers used by Gradle plugins. This workaround helped me.
c
a
Maybe old version of the plugin is used? Anyway it helped for me to apply the properties
c
with the workaround it now works, but its suprising that the problem only occurs in my amper project. maybe because of the millions of repos it needs declared in the settings file