gradle / plugin-portal-requests

Gradle Plugin Portal issues and requests.
https://plugins.gradle.org/
12 stars 8 forks source link

Missing versions for plugin in maven-metadata.xml #197

Closed Fabian-K closed 1 year ago

Fabian-K commented 1 year ago

Expected Behavior

The maven-metadata.xml file for a plugin in https://plugins.gradle.org/m2 contains all versions of the plugin

Current Behavior

While https://plugins.gradle.org/plugin/com.google.cloud.tools.jib shows 3.4.0 as the latest version, the maven-metadata.xml only contains versions up to 3.2.1 https://plugins.gradle.org/m2/gradle/plugin/com/google/cloud/tools/jib-gradle-plugin/maven-metadata.xml

Context

I´m not fully sure here but I think that (corporate) repository caches of https://plugins.gradle.org/ might rely on the maven-metadata.xml to decide which versions to cache/offer. If a version is missing in the maven-metadata.xml, the repository cache is not including the version.

ljacomet commented 1 year ago

Hello,

This is a combination of a couple things:

So from a Gradle perspective, you will be able to resolve the plugin, including its newer versions, if you use the plugins block. If you apply the plugin in a legacy way through its JAR coordinates, you have to update those.

See the plugin page for details.

Fabian-K commented 1 year ago

Ah, thanks! I missed that gradle.plugin.com.google.cloud.tools:jib-gradle-plugin is not used anymore but still had it in buildSrc as a dependency. I´ve updated it to com.google.cloud.tools:jib-gradle-plugin and it works