Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Adding Kotlin Multiplatform support! #177

Closed
Syrou opened this issue Jan 24, 2019 · 7 comments
Closed

Adding Kotlin Multiplatform support! #177

Syrou opened this issue Jan 24, 2019 · 7 comments

Comments

@Syrou
Copy link

Syrou commented Jan 24, 2019

I would like to suggest you make support for kotlin multiplatform since you already support obj-c and java. It would be awesome to be able to use this with kotlin native and the multiplatform eco-system!

@LouisCAD
Copy link

LouisCAD commented Apr 3, 2019

Could be great to have this integrated into the roadmap at some point.

@ln-12
Copy link

ln-12 commented Apr 20, 2022

Is there any progress on this? It shouldn't be too difficult as both Android and iOS are already supported.

@tholenst
Copy link
Contributor

We do not plan to offer a Kotlin implementation any time soon.

@tholenst tholenst closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2023
@LouisCAD
Copy link

Why?

@tholenst
Copy link
Contributor

First, we simply do not have enough people to do this.

But secondly, one can easily use the Java API from Kotlin. Because of this, it is not obvious that having two implementations are actually useful. For example, imagine you have a codebase which is written in Java, and which uses Tink, and which you wish to migrate to Kotlin. You can do so with each file, but you will keep the Java version of Tink (since the Tink objects are method parameters in your code base and migrating one of them won't migrate them all).

In the end, if you come from this path, you anyhow end up having Java Tink objects in your Kotlin codebase. Migrating these to a completely different Tink implementation may not be worth the cost. At that point, you would find it most convenient if the APIs are the same anyhow.

Similarly, if you have a Kotlin codebase which uses Java Tink and a Kotlin codebase which uses Kotlin Tink, merging them would be more difficult than if both use Java Tink.

I think it would be better to simply migrate Tink to Kotlin if this is desired (but also, such a thing is very far out).

@ashughes
Copy link

More than providing an idiomatic Kotlin API, adding support for Kotlin Multiplatform would allow the Kotlin implementation to work on targets other than the JVM.

@LouisCAD
Copy link

OkHttp migrated to Kotlin without breaking the API for Java consumers, and probably using the Convert to Kotlin action from the IDE, either on a file, or directly on the entire source directory.

Maybe it can work out for tink.
Did someone give it a try?

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

No branches or pull requests

5 participants