GradleUp / GradleUp/tapmoc

Dependency validation fails on Gradle plugins

Open
#69 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
109
Forks
6
Avg merge
11m
Merged PRs (30d)
3

Description

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")
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing dependency validation for a project using the java-gradle-plugin, then inspect how gradleApi() and the suppress-gradle-api setting affect validation. Compare the behavior with the documented compileOnlyApi alternatives and verify that supported Gradle versions no longer trigger the reported class-file validation failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.