r8-full-mode-issue-repro
Reproducible Issue with R8’s fullMode
in Kotlin Android Project
Description
This project showcases a reproducible issue related to R8’s fullMode
in a Kotlin Android project. When utilizing R8’s fullMode
, classes are organized in an unexpected manner, resulting in the display of a variable set as Fruit.Cherry
being shown as Fruit.Fig
.
Prerequisites
To replicate the issue, ensure you have the following prerequisites set up:
- Android Studio installed on your system.
- Basic familiarity with Kotlin and Android development concepts.
Steps to Reproduce
- Clone the repository:
git clone [email protected]:theapache64/r8-full-mode-issue-repro.git
cd [email protected]:theapache64/r8-full-mode-issue-repro.git
-
Open the project in Android Studio.
-
Create a release build using the “Build” menu or the Gradle task panel.
-
Run the app on an emulator or physical device.
-
Observe the app’s behavior. The program should assign a value to
Fruit.Cherry
, but it is displayed asFruit.Fig
.
Expected Behavior
The app should correctly display Fruit.Cherry
Issue Details
The problem appears to be connected to the fullMode
configuration in R8. This setting results in unexpected class organization, resulting unpredictable code.