Cannot inline bytecode built with JVM target 17
I use this library in my projects, especially when I use ViewModel in ModalBottomSheets and composables that don't have navigation. For one of my projects, I cannot use it because I get a javaTarget error. I have already set the javaTarget to 17, and I have tried invalidating caches and cleaning the project, but none of them worked. I am using Hilt version 2.51.1 and Resaca-Hilt version 4.1.3.
Java Target:
The error:
Maybe it's related to kotlinOptions being deprecated and replaced with compilerOptions 🤔
Have you tried using the new Kotlin API for this? https://stackoverflow.com/a/77903418/5250468 That's the API I also use in the resaca codebase https://github.com/sebaslogen/resaca/blob/7b089923036c0e517ffb0e979a4e6679dbc8d03a/build.gradle.kts#L48
Maybe it's related to
kotlinOptionsbeing deprecated and replaced withcompilerOptions🤔Have you tried using the new Kotlin API for this? https://stackoverflow.com/a/77903418/5250468 That's the API I also use in the resaca codebase
https://github.com/sebaslogen/resaca/blob/7b089923036c0e517ffb0e979a4e6679dbc8d03a/build.gradle.kts#L48
I applied everything, but none of them are working. This dependency cannot correctly identify if the Java version is 17; it always detects it as Java version 1.8
Maybe it's related to
kotlinOptionsbeing deprecated and replaced withcompilerOptions🤔 Have you tried using the new Kotlin API for this? https://stackoverflow.com/a/77903418/5250468 That's the API I also use in the resaca codebase https://github.com/sebaslogen/resaca/blob/7b089923036c0e517ffb0e979a4e6679dbc8d03a/build.gradle.kts#L48I applied everything, but none of them are working. This dependency cannot correctly identify if the Java version is 17; it always detects it as Java version 1.8
Then I'm out of ideas, maybe if you share your code I can take a look, but if you say other projects work for you, I assume the problem is somewhere in that specific project's configuration.
Ah, one more thing, the JDK that compiles your project has to be 17 or newer, you can check just in case with java --version
Yeah, I know, I'm using the latest Java version. It works for other projects, but not for one of them. I think it's related to KSP or Kotlin DSL. I'll also try downgrading the AGP version
Since there were no updates on this issue in a while for your specific project, I'm closing this for now. If you have any new info or updates, please feel free to reopen.