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

Update the Kotlin generator to support KMP projects #60

Merged
merged 4 commits into from
Jun 11, 2024
Merged

Update the Kotlin generator to support KMP projects #60

merged 4 commits into from
Jun 11, 2024

Conversation

husseinala
Copy link

Description

Add Kotlin Multiplatform support by applying the following updates to the Kotlin generator:

  1. Update the arkana.kt.erb template to ensure the generated Kotlin code is compatible with multiplatform projects by replacing the JVM only function ByteArray#toString(...) with its KMP counterpart ByeArray#decodeToString()
  2. Add is_kotlin_multiplatform_module as a new yml configuration parameter that changes the generated build.gradle file and SourceSet folders to a KMP compatible ones when set to true.

Copy link
Owner

@rogerluan rogerluan left a comment

Choose a reason for hiding this comment

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

Amazing contribution like always, thank you so much! ❤️

Just requested some minor improvements but overall this PR is great! 🙌

Let me know if you have any questions 😊 Also, I apologize for taking so long to get to this PR! I completely missed it in my notifications!

docs/kotlin-demo.png Outdated Show resolved Hide resolved
spec/kotlin_code_generator_spec.rb Outdated Show resolved Hide resolved
spec/kotlin_code_generator_spec.rb Outdated Show resolved Hide resolved
lib/arkana/templates/kotlin/arkana.kt.erb Show resolved Hide resolved
@husseinala husseinala requested a review from rogerluan June 11, 2024 10:31
Copy link
Owner

@rogerluan rogerluan left a comment

Choose a reason for hiding this comment

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

Again, thanks a lot for this! 🚀
Great contribution as always!

@rogerluan rogerluan merged commit 10a2bc9 into rogerluan:main Jun 11, 2024
10 checks passed
@rogerluan
Copy link
Owner

Released in https://github.com/rogerluan/arkana/releases/tag/v2.1.0 🚀

@husseinala husseinala deleted the add-kmp-support branch June 11, 2024 12:57
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