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
feat: KTX module #516
feat: KTX module #516
Conversation
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.
Thanks a lot for creating this PR / working on a kotlin module :)
I left a few general comments, but should find the time to really review it in the next few days.
twitch4j-ktx/src/main/java/com/github/twitch4j/ktx/chat/ChatKtx.kt
Outdated
Show resolved
Hide resolved
twitch4j-ktx/src/main/java/com/github/twitch4j/ktx/main/EventManagerKtx.kt
Outdated
Show resolved
Hide resolved
I can at least add one more thing. For documentation please use Dokka. And generate javadoc using |
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.
Thanks for getting started on this!
twitch4j-ktx/src/main/java/com/github/twitch4j/ktx/chat/ChatKtx.kt
Outdated
Show resolved
Hide resolved
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.
I'd add some suggested changes, if @iProdigy / @PhilippHeuer have time to check. :)
twitch4j-ktx/src/main/java/com/github/twitch4j/ktx/chat/ChatKtx.kt
Outdated
Show resolved
Hide resolved
twitch4j-ktx/build.gradle.kts
Outdated
compileOnly(project(":twitch4j")) | ||
|
||
// Kotlin coroutines | ||
api(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core") |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
We're not using it, so there is no reason to include it.
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.
so there is no reason to set kotlinOptions.jvmTarget
in KotlinCompile
tasks
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.
don't need to explicitly add stdlib
: https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library
we could specify jvmTarget
(but it already defaults to 1.8
): https://kotlinlang.org/docs/gradle.html#attributes-specific-to-jvm
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.
Last thing todo is rename:
kotlin/src/main/java/com/github/twitch4j/kotlin/chat/ChatKtx.kt
-> kotlin/src/main/java/com/github/twitch4j/kotlin/chat/Chat.kt
kotlin/src/main/java/com/github/twitch4j/kotlin/main/HystrixKtx.kt
-> kotlin/src/main/java/com/github/twitch4j/kotlin/api/Hystrix.kt
kotlin/src/test/java/com/github/twitch4j/kotlin/chat/ChatKtxTest.kt
-> kotlin/src/test/java/com/github/twitch4j/kotlin/chat/ChatTest.kt
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
👀 |
Thanks for your contribution & apologies for the merge delay |
Prerequisites for Code Changes
...
Additional Information
This will add a few kotlin convenience extension functions in a separate library so it can be thrown in if the person wants it.