@@ -2,8 +2,8 @@ plugins {
22 kotlin(" jvm" )
33 id(" maven-publish" )
44 id(" application" )
5- id( " com.github.jk1.tcdeps" )
6- id( " com.jaredsburrows.license" )
5+ alias(libs.plugins. com.github.jk1.tcdeps)
6+ alias(libs.plugins. com.jaredsburrows.license)
77 id(" kotlin-language-server.publishing-conventions" )
88 id(" kotlin-language-server.distribution-conventions" )
99 id(" kotlin-language-server.kotlin-conventions" )
@@ -19,9 +19,7 @@ application {
1919 mainClass.set(serverMainClassName)
2020 description = " Code completions, diagnostics and more for Kotlin"
2121 applicationDefaultJvmArgs = listOf (" -DkotlinLanguageServer.version=$version " )
22- applicationDistribution.into(" bin" ) {
23- fileMode = 755
24- }
22+ applicationDistribution.into(" bin" ) { fileMode = 755 }
2523}
2624
2725repositories {
@@ -40,49 +38,49 @@ dependencies {
4038
4139 implementation(project(" :shared" ))
4240
43- implementation(" org.eclipse.lsp4j:org.eclipse.lsp4j" )
44- implementation(" org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc" )
41+ implementation(libs.org.eclipse.lsp4j.lsp4j)
42+ implementation(libs.org.eclipse.lsp4j.jsonrpc)
43+
4544 implementation(kotlin(" compiler" ))
4645 implementation(kotlin(" scripting-compiler" ))
4746 implementation(kotlin(" scripting-jvm-host-unshaded" ))
4847 implementation(kotlin(" sam-with-receiver-compiler-plugin" ))
4948 implementation(kotlin(" reflect" ))
50- implementation(" org.jetbrains:fernflower" )
51- implementation(" org.jetbrains.exposed:exposed-core" )
52- implementation(" org.jetbrains.exposed:exposed-dao" )
53- implementation(" org.jetbrains.exposed:exposed-jdbc" )
54- implementation(" com.h2database:h2" )
55- implementation(" com.github.fwcd.ktfmt:ktfmt" )
56- implementation(" com.beust:jcommander" )
57- implementation(" org.xerial:sqlite-jdbc" )
58-
59- testImplementation(" org.hamcrest:hamcrest-all" )
60- testImplementation(" junit:junit" )
61- testImplementation(" org.openjdk.jmh:jmh-core" )
62-
63- // See https://github.com/JetBrains/kotlin/blob/65b0a5f90328f4b9addd3a10c6f24f3037482276/libraries/examples/scripting/jvm-embeddable-host/build.gradle.kts#L8
49+ implementation(libs.org.jetbrains.fernflower)
50+ implementation(libs.org.jetbrains.exposed.core)
51+ implementation(libs.org.jetbrains.exposed.dao)
52+ implementation(libs.org.jetbrains.exposed.jdbc)
53+ implementation(libs.com.h2database.h2)
54+ implementation(libs.com.github.fwcd.ktfmt)
55+ implementation(libs.com.beust.jcommander)
56+ implementation(libs.org.xerial.sqlite.jdbc)
57+
58+ testImplementation(libs.hamcrest.all)
59+ testImplementation(libs.junit.junit)
60+ testImplementation(libs.org.openjdk.jmh.core)
61+
62+ // See
63+ // https://github.com/JetBrains/kotlin/blob/65b0a5f90328f4b9addd3a10c6f24f3037482276/libraries/examples/scripting/jvm-embeddable-host/build.gradle.kts#L8
6464 compileOnly(kotlin(" scripting-jvm-host" ))
6565 testCompileOnly(kotlin(" scripting-jvm-host" ))
6666
67- annotationProcessor(" org.openjdk.jmh:jmh- generator- annprocess" )
67+ annotationProcessor(libs. org.openjdk.jmh. generator. annprocess)
6868}
6969
70- configurations.forEach { config ->
71- config.resolutionStrategy {
72- preferProjectModules()
73- }
74- }
70+ configurations.forEach { config -> config.resolutionStrategy { preferProjectModules() } }
7571
76- tasks.startScripts {
77- applicationName = " kotlin-language-server"
78- }
72+ tasks.startScripts { applicationName = " kotlin-language-server" }
7973
8074tasks.register<Exec >(" fixFilePermissions" ) {
8175 // When running on macOS or Linux the start script
8276 // needs executable permissions to run.
8377
8478 onlyIf { ! System .getProperty(" os.name" ).lowercase().contains(" windows" ) }
85- commandLine(" chmod" , " +x" , " ${tasks.installDist.get().destinationDir} /bin/kotlin-language-server" )
79+ commandLine(
80+ " chmod" ,
81+ " +x" ,
82+ " ${tasks.installDist.get().destinationDir} /bin/kotlin-language-server"
83+ )
8684}
8785
8886tasks.register<JavaExec >(" debugRun" ) {
@@ -91,9 +89,7 @@ tasks.register<JavaExec>("debugRun") {
9189 standardInput = System .`in `
9290
9391 jvmArgs(debugArgs)
94- doLast {
95- println (" Using debug port $debugPort " )
96- }
92+ doLast { println (" Using debug port $debugPort " ) }
9793}
9894
9995tasks.register<CreateStartScripts >(" debugStartScripts" ) {
@@ -116,10 +112,6 @@ tasks.withType<Test>() {
116112 }
117113}
118114
119- tasks.installDist {
120- finalizedBy(" fixFilePermissions" )
121- }
115+ tasks.installDist { finalizedBy(" fixFilePermissions" ) }
122116
123- tasks.build {
124- finalizedBy(" installDist" )
125- }
117+ tasks.build { finalizedBy(" installDist" ) }
0 commit comments