TouchPortalPluginSDK icon indicating copy to clipboard operation
TouchPortalPluginSDK copied to clipboard

[Feature] Improve Kotlin Sample for 8.3

Open DissonantAU opened this issue 6 months ago • 1 comments

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 avatar Aug 18 '24 12:08 DissonantAU