Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Versions
Description
We have encountered an issue when using R8 to minify & obfuscate published library artifact. When the library contains a Kotlin interface with a companion object which defines
operator fun invoke()
and the operator also has annotation@JvmName("someName")
theinvoke
operator is removed (possibly inlined) from the artifact, but the signature is kept.This issue is not apparent if the library module is directly used within the project in other module via the gradle dependency definition
implementation(project(mylibrary))
and is present only if the published library artifact is used.Sample:
Sample project:https://github.com/pavelreiter/r8-issue-interface-invoke
Example affected code:
Example test
The test
configurationInvoke
fails withjava.lang.NoSuchMethodError: 'com.example.mylibrary.Configuration com.example.mylibrary.Configuration$Companion.invoke()'