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

Downgrade Java version to 1.8 and set kotlin JVM target 1.8 to fix compilation issues in newer android studios #368

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ android {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we were already using 17 from the targetCompatibility, but I think that might be too high? According to this table, Java 17 is only fully supported starting at Android 14.

I can never figure out where this might break, but my assumption is that if we accidentally use any newer API, it might compile to something incompatible on lower Android versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a valid concern... I believe it might have been like this when the plugin was created and we forgot to downgrade it...

I haven't heard of any related issues, but still might be worth to downgrade it to be safe. I will do it as part of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downgraded and did some testing, seems to be working correctly. Lmk if you think this could have any unintended consequences @JayShortway!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I think this is safer! I don't think there should be unintended consequences. (Famous last words 😅) Thanks for being thorough with testing! 🙏

}
}

repositories {
Expand Down