diff options
author | Éamonn McManus <emcmanus@google.com> | 2023-08-15 12:19:08 -0700 |
---|---|---|
committer | Google Java Core Libraries <java-libraries-firehose+copybara@google.com> | 2023-08-15 12:19:59 -0700 |
commit | b21c7f4fb103c71289cddba22e5aeada81cd748f (patch) | |
tree | 0b9ca6a109dcf2a8b39774b70adf43266a652f73 | |
parent | b431b026ce375ea66374df26a309087c400af5ef (diff) | |
download | auto-b21c7f4fb103c71289cddba22e5aeada81cd748f.tar.gz |
Remove `META-INF/*.kotlin_module` entries from the AutoValue jar.
We bundle a shaded copy of `kotlinx.metadata.jvm` and related libraries, which we use to inspect Kotlin data classes. The libraries are only called from Java code, which means that `META-INF/kotlinx-metadata-jvm.kotlin_module` and the like serve no purpose, other than to confuse the Kotlin compiler when it sees these entries.
Fixes #1574.
RELNOTES=An "incompatible version" issue with Kotlin compilation has been fixed. See #1574.
PiperOrigin-RevId: 557209904
-rw-r--r-- | value/processor/pom.xml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/value/processor/pom.xml b/value/processor/pom.xml index cedc5f08..a93c7765 100644 --- a/value/processor/pom.xml +++ b/value/processor/pom.xml @@ -230,6 +230,17 @@ <exclude>com.google.code.findbugs:jsr305</exclude> </excludes> </artifactSet> + <filters> + <filter> + <artifact>*:*</artifact> + <excludes> + <!-- Don't include kotlinx-metadata.kotlin_module, etc. We're shading those + libaries and they're only used from Java. Leaving them in the jar creates + "incompatible version" errors from the Kotlin compiler. --> + <exclude>META-INF/*.kotlin_module</exclude> + </excludes> + </filter> + </filters> <transformers> <!-- Needed to avoid "No MetadataExtensions instances found in the classpath" from Kotlin reflection. --> <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |