Skip to content

Conversation

@MMauro94
Copy link
Contributor

Kotlinx datetime has removed the Clock and Instant classes since version 0.7.0 as they have been moved into the Kotlin standard library (see https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#deprecation-of-instant).

This commit updates various dependencies in order to be able to use the new version of Kotlinx datetime and start using those classes from stdlib.

Major dependency upgrades:

  • kotlinx-datetime: updated to latest 0.7.1
  • kotlinx-serialization: needed as the latest version (1.9.0) contains serializers for the new stdlib Instant
  • kotlin: updated to 2.2.10 because the latest version of the serialization library requires Kotlin 2.2

Given that the new Instant and Clock classes require an experimental opt-in to be used, I've added it project-wide in the compiler options.

Given I was updating dependencies, I've also taken the liberty to update other stuff like Dokka, Coroutines, Ktor and JUnit.


Note: this is a breaking change but will allow consumers of this library to update kotlinx-datetime.

Kotlinx datetime has removed the `Clock` and `Instant` classes since version 0.7.0 as they have been moved into the Kotlin standard library (see https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#deprecation-of-instant).

This commit updates various dependencies in order to be able to use the new version of Kotlinx datetime and start using those classes from stdlib.

Major dependency upgrades:
- `kotlinx-datetime`: updated to latest 0.7.1
- `kotlinx-serialization`: needed as the latest version (1.9.0) contains serializers for the new stdlib `Instant`
- `kotlin`: updated to 2.2.10 because the latest version of the serialization library requires Kotlin 2.2

Given that the new `Instant` and `Clock` classes require an experimental opt-in to be used, I've added it project-wide in the compiler options.

Given I was updating dependencies, I've also taken the liberty to update other stuff like Dokka, Coroutines, Ktor and JUnit.
@ChrisKruegerDev
Copy link
Owner

@MMauro94 Thanks for the library upgrade. I need some time to check also the integration with some larger apps such as Moviebase.

@MMauro94
Copy link
Contributor Author

Sure! Let me know if you need something changed. I think in the worst case we try using the 0.7.1-0.6.x-compat version.

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 this pull request may close these issues.

2 participants