Skip to content

Bundled plugin resolution fails with multiple calls to localPlatformArtifacts() #1728

@murkvin

Description

@murkvin

What happened?

When multiple calls are made to localPlatformArtifacts(), bundled plugins fail to resolve.

Relevant log output or stack trace

* What went wrong:
Configuration cache state could not be cached: field `provider` of `org.gradle.internal.serialize.codecs.core.ProviderBackedFileCollectionSpec` bean found in field `element` of `java.util.Collections$SingletonList` bean found in field `elements` of `org.gradle.internal.serialize.codecs.core.ResolutionBackedFileCollectionSpec` bean found in field `__classpathSnapshot__` of `org.jetbrains.kotlin.gradle.tasks.KotlinCompile$ClasspathSnapshotProperties` bean found in field `__classpathSnapshotProperties__` of task `:compileKotlin` of type `org.jetbrains.kotlin.gradle.tasks.KotlinCompile`: error writing value of type 'org.gradle.api.internal.provider.DefaultProvider'
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find bundledPlugin:com.intellij.java:2023.2.7+894.
     Required by:
         project :

Steps to reproduce

build.gradle.kts

repositories {
    intellijPlatform {
        defaultRepositories() // Wraps a call to `localPlatformArtifacts()`
        localPlatformArtifacts()
    }
}

// [...]

dependencies {
    intellijPlatform {
        bundledPlugin("com.intellij.java")
    }
}

Gradle IntelliJ Plugin version

2.0.0

Gradle version

8.7

Operating System

macOS

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

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions