Skip to content

[Bug] Using nested actions from Gradle doesn't work #1694

Description

@krzema12

Component

Action

Use an action that is not in some repo's root directory, from a Gradle project:

implementation("gradle:actions__setup-gradle:v4")

Expected

Works like with Kotlin Scripting.

Actual

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 `:github-workflows-kt:compileTestKotlin` of type `org.jetbrains.kotlin.gradle.tasks.KotlinCompile`: error writing value of type 'org.gradle.api.internal.provider.DefaultProvider'
For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
> Could not resolve all files for configuration ':github-workflows-kt:testCompileClasspath'.
10 actionable tasks: 4 executed, 6 from cache
   > Could not resolve gradle:actions__setup-gradle:v4.
     Required by:
         project :github-workflows-kt
      > Could not resolve gradle:actions__setup-gradle:v4.
         > inconsistent module metadata found. Descriptor: gradle:actions/setup-gradle:v4 Errors: bad module name: expected='actions__setup-gradle' found='actions/setup-gradle'

Reproducer: #1693

Workaround, if exists

repositories {
    maven {
        ...
        metadataSources {
            artifact()
        }
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions