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

Could not resolve io.github.pdvrieze.xmlutil:core:0.86.3 #1741

Closed
Vanco opened this issue Aug 19, 2024 · 3 comments
Closed

Could not resolve io.github.pdvrieze.xmlutil:core:0.86.3 #1741

Vanco opened this issue Aug 19, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@Vanco
Copy link

Vanco commented Aug 19, 2024

What happened?

My multi-module project is work on version 2.0.0 very well. but when I try to upgrade to 2.0.1,

  1. modifiy the version string from 2.0.0 to 2.0.1
  2. sync gradle.
  3. fail with error message.

Relevant log output or stack trace

Could not resolve all artifacts for configuration 'classpath'.
> Could not resolve io.github.pdvrieze.xmlutil:core:0.86.3.
  Required by:
      unspecified:unspecified:unspecified > org.jetbrains.intellij.platform.settings:org.jetbrains.intellij.platform.settings.gradle.plugin:2.0.1 > org.jetbrains.intellij.platform:intellij-platform-gradle-plugin:2.0.1 > io.github.pdvrieze.xmlutil:serialization-jvm:0.86.3
   > The consumer was configured to find a library for use during runtime, compatible with Java 21, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.9'. There are several available matching variants of io.github.pdvrieze.xmlutil:core:0.86.3
     The only attribute distinguishing these variants is 'org.jetbrains.kotlin.platform.type'. Add this attribute to the consumer's configuration to resolve the ambiguity:
       - Value: 'androidJvm' selects variant: 'androidRuntimeElements-published'
       - Value: 'jvm' selects variant: 'jvmRuntimeElements-published'

Steps to reproduce

  1. modifiy the version string from 2.0.0 to 2.0.1
  2. sync gradle.

Gradle IntelliJ Plugin version

2.0.1

Gradle version

8.9

Operating System

macOS

Link to build, i.e. failing GitHub Action job

No response

@Vanco Vanco added the bug label Aug 19, 2024
@hsz
Copy link
Member

hsz commented Sep 5, 2024

Do you regularly apply the plugin to the project or import it into a custom buildscript?

@hsz hsz self-assigned this Sep 5, 2024
@Vanco
Copy link
Author

Vanco commented Sep 6, 2024

I apply the plugin in build-logic project. I attached my project structure for reference. Before I upgrade to version 2.0.1, the old version is 2.0.0, everything work as expected.

when I change the version code to 2.0.1, (in /platforms/plutins-platform/build.gradle.kts), the project will fail in gradle configuration phase.

vssd-demo.zip

@hsz
Copy link
Member

hsz commented Sep 6, 2024

This issue is directly related to pdvrieze/xmlutil#56
As one is using the plugin with no intermediate build-logic involved, my constraints seem to help Gradle pick the proper transitive dependency variant:

constraints {
listOf(libs.xmlutil.core, libs.xmlutil.serialization).forEach {
implementation(it) {
attributes { attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm) }
}
}
}

However, this somehow gets lost in a custom build-logic setup.

@hsz hsz added this to the next milestone Sep 18, 2024
@hsz hsz closed this as completed Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants