Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Different fingerprints in the compile classpath for the same dependency. #32464

Open
Assignees
abstrattasodja
Milestone
@cdsap

Description

@cdsap

Current Behavior

We are observing cache misses in tasks likeJavaCompile due to input classpath differences for the same dependency. Using the build scan comparison, the difference points to a classpath input discrepancy where specific dependencies are reported as having different contents:

Image

Initially, we compared both JARs from different environments (CI/LOCAL) using various methods (IDE, diff, cmp), and the results consistently indicated that the files are identical. However, we are still able to reproduce this behavior even when the dependency resides in the same Gradle user home:

Image

If we track the fingerprint of dependencies with classpath differences, such ascom.squareup.okhttp3:okhttp:4.12.0, during the build by enablingorg.gradle.caching.debug=true, we notice a difference in the fingerprinting:

Work UnitInputTypeFirst BuildSecond Build
BuildToolsApiClasspathEntrySnapshotTransforminputArtifactCLASSPATH9280192801
JavaCompileclasspathCOMPILE_CLASSPATH928015a62b

Expected Behavior

No classpath differences for the same dependency

Context (optional)

This issue is being investigated after observing similar behavior among different users. We are providing a reproducible repository in the following section, but we have identified certain conditions necessary to reproduce the issue:

  • The issue appears when one of the dependencies used in the Java compile classpath has already been downloaded from another "scope" in the project, such as through init scripts.
  • The issue occurs only in projects that contain both Java and Kotlin.

Self-contained Reproducer Project

  1. Clonehttps://github.com/cdsap/ReproducerClasspathDifference
  2. In a clean Gradle user home cache, execute:./gradlew clean :tasks --init-script gradle/init.gradle.kt
  3. Remove the project's.gradle folder and terminate Gradle/Kotlin processes:jps | grep -E "GradleDaemon|KotlinCompileDaemon" | awk '{print $1}' | xargs -r kill
  4. Execute ./gradlew clean :lib:assemble
  5. Remove the Gradle user home cache
  6. Remove the project's.gradle folder and terminate Gradle Kotlin processe
  7. Execute./gradlew clean :lib:assemble
  8. Compare :lib:assemble scans

Gradle version

8.12

Build scan URL (optional)

https://ge.solutions-team.gradle.com/s/ambfo5kmqrxd2 andhttps://ge.solutions-team.gradle.com/s/nrraf4seirqrc

Your Environment (optional)

No response

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp