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

[Feature] Improve Kotlin Sample for 8.3 #70

Open
DissonantAU opened this issue Aug 18, 2024 · 1 comment
Open

[Feature] Improve Kotlin Sample for 8.3 #70

DissonantAU opened this issue Aug 18, 2024 · 1 comment

Comments

@DissonantAU
Copy link

Kotlin Version in the sample in 8.3.0 is deprecated, I'd like to update date it and tweak some related options:

  • Update Kotlin version to 1.9.24
    • 2.0 is newest, but several support libraries are still being updated
    • Anyone who wants to use 2.0 can probably change the version without issue with other changes below
  • Add javaParameters complier option
    • Current versions don't include function parameter names in JAR by default, which breaks the SDK's ability to auto-call functions
  • Adjust Groovy Tasks to prevent errors when building with newer versions of Kotlin
    • add dependsOn project.tasks.processResources to copyResources Task
    • add setDuplicatesStrategy(DuplicatesStrategy.WARN) to copyJar Task
  • Copy some examples from the Java Sample to flesh the Kotlin one out

Side note: 8.3 dependencies should be updated too if there's no plan for v9 to be released - several have CVEs
I can submit a new issue for that if it's worth while. May be worth bundling all this into a 8.3.1 release?

@DissonantAU
Copy link
Author

I found that TouchPortalPluginPackager tries to add -java-parameters but kotlin > compilerOptions takes javaParameters = true
It likely changed in newer versions of Kotlin, Probably around 1.6

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

No branches or pull requests

1 participant