Skip to content

ignore '**/java/lang/invoke/**' from runtimeClassPath #341

@kenyee

Description

@kenyee

We're hitting transform differences in cache artifacts:

Only in /tmp/extracted/java.base: NOTICES
Binary files extracted/java.base/java/lang/invoke/DelegatingMethodHandle$Holder.class and /tmp/extracted/java.base/java/lang/invoke/DelegatingMethodHandle$Holder.class differ
Binary files extracted/java.base/java/lang/invoke/DirectMethodHandle$Holder.class and /tmp/extracted/java.base/java/lang/invoke/DirectMethodHandle$Holder.class differ

I was asking about it in this thread: https://gradle-community.slack.com/archives/CAHSN3LDN/p1661952779052469

And someone mentioned, they added this to work around this issue:

allProjects {
  normalization {
    runtimeClasspath {
      ignore '**/module-descriptor.txt' // don't need if you are up to date on AGP cache plug in fix
      ignore '**/java/lang/invoke/**'
    }
}

It looks like this plugin has a JdkImageWorkaround class that does this normalization as well but doesn't cover this case:
https://github.com/gradle/android-cache-fix-gradle-plugin/blob/d7f486e318e3698afa58834917b781cb0ef151c8/src/main/groovy/org/gradle/android/workarounds/JdkImageWorkaround.groovy

Would be nice if it were done in this plugin as well so we don't have to and this would improve cache hits for everyone.

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