-
Notifications
You must be signed in to change notification settings - Fork 117
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
Update Kotlin to 1.6.10 #1015
Merged
Merged
Update Kotlin to 1.6.10 #1015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This 'MaxPermSize' JVM argument was added back in 2016 (July) and as part of this starting 780ed5d commit. By now, and with newer versions of Java (see Java 17), this argument has been effectively removed. As such, when engineers are trying to build this project with JDK17, they can't, see below exception: ------------------------------------------------------------------------ * What went wrong: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/7.4.2/userguide/gradle_daemon.html Process command line: /opt/homebrew/Cellar/openjdk@17/17.0.5/... Please read the following process output to find out more: ----------------------- Unrecognized VM option 'MaxPermSize=512m' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. ------------------------------------------------------------------------ FYI: This JVM argument went obsolete as part of Java 16 and then completely removed as part of Java 17, see below: - Java 16: https://docs.oracle.com/en/java/javase/16/docs/specs/man/ java.html#obsolete-java-options - Java 17: https://docs.oracle.com/en/java/javase/17/docs/specs/man/ java.html#removed-java-options
This update is necessary because otherwise, with newer versions of Java (see Java 17), this project cannot be compiled due to the fact that with JDK17 it is no longer possible to make a field accessible using reflection. It seems that Kotlin 1.4.20 is doing it, rightfully so, as that point of time this 1.4.20 version of Kotlin wasn't ready for Java 17. FYI: The code fails to compile with the below exception: ------------------------------------------------------------------------ > Task :aztec:compileDebugKotlin FAILED Could not perform incremental compilation: Could not connect to Kotlin compile daemon Could not connect to kotlin daemon. Using fallback strategy. exception: java.lang.ExceptionInInitializerError at org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel. <clinit>(LanguageLevel.java:25) ... Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.util.ResourceBundle.setParent (java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module @41e77c24 at java.base/java.lang.reflect.AccessibleObject. checkCanSetAccessible(AccessibleObject.java:354) ... ... 19 more ------------------------------------------------------------------------ Also, as part of this update the 'max/mindBy' were replaced by 'max/mindByOrNull', but other than that everything else remained the same.
This is done because otherwise the 'testDebugUnitTest' task fails the test, when run on command line, with the below 'ClassNotFoundException' error: ------------------------------------------------------------------------ java.lang.NoClassDefFoundError: android/content/ContentResolver ... Caused by: java.lang.ClassNotFoundException: couldn't load android.content.ContentResolver ... Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61" ------------------------------------------------------------------------ Release Link: https://github.com/robolectric/robolectric/releases/tag/ robolectric-4.9
planarvoid
approved these changes
Nov 17, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you so much for the review and testing @planarvoid , awesome! 🚀 ❤️ 🥇 |
1 task
50 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades Kotlin to
1.6.10
.FYI: This is primarily done to unblock development with JDK17.
It also includes the following:
Test
Review
@planarvoid and @danilo04 as you were also involved in #982.
Make sure strings will be translated:
strings.xml
as a part of the integration PR.