fwcd / kotlin-language-server

Kotlin code completion, diagnostics and more for any editor/IDE using the Language Server Protocol
MIT License
1.67k stars 210 forks source link

Migrate gradle from groovy to kotlin dsl #415

Closed RenFraser closed 1 year ago

RenFraser commented 1 year ago

Hi @fwcd, this is a PR to migrate the build scripts from Groovy to Kotlin DSL. It's not a perfect implementation but think that it'll be a good start that we can build upon.

To create this change I've:

  1. Run a conversion script using GradleKotlinConverter .
  2. Fixed up any missed changes and manually went through the DSL files to ensure they worked.
  3. Compared the diff against your migration PR from 2020 and used your changes as a reference to fix any remaining issues.
  4. Ran the build on my GitHub actions with a successful outcome

I'd love to get this merged because I'd like to introduce some static analysis tools to the build, such as ktlint and Detekt

themkat commented 1 year ago

Tried building for both Java 11 and 17 locally, and both succeed on my machine 😱 Unsure on why the CI fails here. Could it be that the tests that fails are a bit flaky? Will try to have a deeper look at that...

RenFraser commented 1 year ago

tests that fails are a bit flaky

Ok, I've bumped the kotlin version in the top level build.gradle.kts to match the newly committed version of 1.8.10. If you can approve the workflow and it passes then it could be just that there was a version mismatch that needed to be updated?

themkat commented 1 year ago

tests that fails are a bit flaky

Ok, I've bumped the kotlin version in the top level build.gradle.kts to match the newly committed version of 1.8.10. If you can approve the workflow and it passes then it could be just that there was a version mismatch that needed to be updated?

Nice! Still waiting for accesses, but if I get them I will approve the workflow 🙂

fwcd commented 1 year ago

@themkat I've sent out an invite. Did you get my e-mail?

themkat commented 1 year ago

@themkat I've sent out an invite. Did you get my e-mail?

Yes 😄 Thank you! Will try to have a look later tonight. Sadly I need some time to relax after a long day at work first 🙁