Skip to content

Dependency validation fails on Gradle plugins #69

@martinbonnin

Description

@martinbonnin

Description

Using the java-gradle-plugin adds gradleApi() as an api (or compileOnlyApi in Gradle 9.4) dependency.

This is problematic because:

Workaround:

set org.gradle.unsafe.suppress-gradle-api=true in your gradle.properties

echo 'org.gradle.unsafe.suppress-gradle-api=true' >> gradle.properties

Add the correct minimum version of Gradle you want to support:

dependencies {
  compileOnlyApi("org.gradle.experimental:gradle-public-api-internal:$gradleVersion")
}

Or if if gradle-public-api-internal is not published for the version of Gradle you're targeting, you may use the Nokee redistributed artifacts:

dependencies {
  compileOnlyApi("dev.gradleplugins:gradle-api:$gradleVersion")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions