Using `latest.integration` for maven snapshot does not fetch the latest

I’m using the version catalog (Gradle 7.4.1) and I need to access snapshots libraries as they are instable at this time. But I would like to get the latest versions. For that I’m using latest.integration as documented on the gradle doc for dynamic versions.

[versions]
fireplace = "latest.integration"

[libraries]
fireplace-swing = { module = "io.github.bric3.fireplace:fireplace-swing", version.ref = "fireplace" }
fireplace-swing-animation = { module = "io.github.bric3.fireplace:fireplace-swing-animation", version.ref = "fireplace" }

[bundles]
fireplace = ["fireplace-swing", "fireplace-swing-animation"]
repositories {
    mavenCentral()
    maven("https://s01.oss.sonatype.org/content/repositories/snapshots")
}

dependencies {
    implementation(libs.bundles.fireplace) {
        isChanging = true
    }
}

configurations.all {
    resolutionStrategy.cacheChangingModulesFor(0, "seconds")
    resolutionStrategy.cacheDynamicVersionsFor(0, "seconds")
}

On the repository the maven-metadata.xml, indicates the following :


<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>io.github.bric3.fireplace</groupId>
  <artifactId>fireplace-swing</artifactId>
  <versioning>
    <latest>3a9439c-SNAPSHOT</latest>
    <versions>
      <version>publication-64115d5--SNAPSHOT</version>
      <version>pull-30-merge-e465fa4--SNAPSHOT</version>
      <version>e425109-SNAPSHOT</version>
      <version>cace2dd-SNAPSHOT</version>
      <version>4f06deb-SNAPSHOT</version>
      <version>6989e7e-SNAPSHOT</version>
      <version>d8346e0-SNAPSHOT</version>
      <version>12688e6-SNAPSHOT</version>
      <version>fe12c9b-SNAPSHOT</version>
      <version>5474f3a-SNAPSHOT</version>
      <version>89cb6fa-SNAPSHOT</version>
      <version>265b5fe-SNAPSHOT</version>
      <version>3a9439c-SNAPSHOT</version>
    </versions>
    <lastUpdated>20220321073023</lastUpdated>
  </versioning>
</metadata>

However even after a ./gradlew --refresh-dependencies, the latest snapshot is not used.

./gradlew dependencyInsight --dependency fireplace
Type-safe dependency accessors is an incubating feature.

> Task :dependencyInsight
io.github.bric3.fireplace:fireplace-swing:12688e6-SNAPSHOT:20220318.084249-1
   variant "apiElements" [
      org.gradle.category                = library
      org.gradle.dependency.bundling     = external
      org.gradle.jvm.version             = 11
      org.gradle.libraryelements         = jar (compatible with: classes)
      org.gradle.usage                   = java-api
      org.gradle.status                  = integration (not requested)

      Requested attributes not found in the selected variant:
         org.gradle.jvm.environment         = standard-jvm
         org.jetbrains.kotlin.platform.type = jvm
   ]

io.github.bric3.fireplace:fireplace-swing:latest.integration -> 12688e6-SNAPSHOT
\--- compileClasspath

io.github.bric3.fireplace:fireplace-swing-animation:5474f3a-SNAPSHOT:20220318.131601-1
   variant "apiElements" [
      org.gradle.category                = library
      org.gradle.dependency.bundling     = external
      org.gradle.jvm.version             = 11
      org.gradle.libraryelements         = jar (compatible with: classes)
      org.gradle.usage                   = java-api
      org.gradle.status                  = integration (not requested)

      Requested attributes not found in the selected variant:
         org.gradle.jvm.environment         = standard-jvm
         org.jetbrains.kotlin.platform.type = jvm
   ]

io.github.bric3.fireplace:fireplace-swing-animation:latest.integration -> 5474f3a-SNAPSHOT
\--- compileClasspath

I don’t think I’ve done something wrong. But maybe I missed something.

I’ve also tried to set the version as a +

- fireplace = "latest.integration"
+ fireplace = "+"

To get the latest version I must write the snapshot version manually

- fireplace = "latest.integration"
+ fireplace = "3a9439c-SNAPSHOT"

Could it because the snapshots have the commit it ?