Skip to content

Commit 9808c4e

Browse files
eamonnmcmanusGoogle Java Core Libraries
authored and
Google Java Core Libraries
committed
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: 557180357
1 parent b431b02 commit 9808c4e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: value/processor/pom.xml

+11
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,17 @@
230230
<exclude>com.google.code.findbugs:jsr305</exclude>
231231
</excludes>
232232
</artifactSet>
233+
<filters>
234+
<filter>
235+
<artifact>*:*</artifact>
236+
<excludes>
237+
<!-- Don't include kotlinx-metadata.kotlin_module, etc. We're shading those
238+
libaries and they're only used from Java. Leaving them in the jar creates
239+
"incompatible version" errors from the Kotlin compiler. -->
240+
<exclude>META-INF/*.kotlin_module</exclude>
241+
</excludes>
242+
</filter>
243+
</filters>
233244
<transformers>
234245
<!-- Needed to avoid "No MetadataExtensions instances found in the classpath" from Kotlin reflection. -->
235246
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>

0 commit comments

Comments
 (0)