Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error with Kakao new version 3.5.0 #118

Open
tasomaniac opened this issue Feb 5, 2024 · 5 comments
Open

Compilation error with Kakao new version 3.5.0 #118

tasomaniac opened this issue Feb 5, 2024 · 5 comments

Comments

@tasomaniac
Copy link

tasomaniac commented Feb 5, 2024

There is a difference between the JDK being used to build the library vs the "target" it is set to. The best practice is to set the JDK to the most up to date to get compiler benefits. But the target is better to be set at a minimum level to increase compatibility. This is similar to libraries setting Android minSdk to 21 or 23. Most Kotlin libraries are set to 11.

I see in this PR from before that 2 things are updated together:

2nd one is not needed and it creates the below incompatibility.

Steps to reproduce:

  1. Just update the version
  2. Compile/assemble test build

Observed Results:

The following error is observed

e: ScreenExtensions.kt:33:12 Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 11. Please specify proper '-jvm-target' option

Expected Results:

Compile just fine when the host app targets JVM 11

@Vacxe
Copy link
Member

Vacxe commented Mar 26, 2024

@tasomaniac unfortunately here is technical difference between minSdk and tooling versions. minSdk is supportive parameter, but keeping build tooling up to date is a technical debt in project.

https://developer.android.com/build/releases/gradle-plugin

Regarding to android gradle plugin documentation you follow this compatibility map

Screenshot 2024-03-26 at 10 39 10 AM

For Kakao we trying to maintain out debt and support all latest versions as we can, because migration between minor versions is much easier then from example Gradle 4 -> 8.

If you want to use latest library version you may migrate you project to the latest tooling set as well

We don't have plans to roll back to gradle 8.3 and Java 11

@tasomaniac
Copy link
Author

Maybe you got me wrong. I was giving an analogy. You can use all the latest tools in your project. You can even use JDK 21 (much newer than 11). But you don't have to change the target version. If you do change it, you force your users of the library to go up too. You can still use whatever Java version and Android version internally but keep the compatibility to a lower number. This is actually how most libraries do including Google's AndroidX project etc.

@Vacxe
Copy link
Member

Vacxe commented Mar 27, 2024

Sorry mate @tasomaniac I still didn't get a point what exactly you want to change without rolling back to previous tooling versions. Please raise a Pull Request with proposal changes.

@tasomaniac
Copy link
Author

That's alright. I opened this up to understand if this behavioral change was intentional because we cannot update anymore

I will open a PR with perhaps a failing repro project. Just need to find some time

@Vacxe
Copy link
Member

Vacxe commented Mar 27, 2024

@tasomaniac I've tried many other options to make it run with 11 java compatibility, unfortunately with no results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants