@@ -2,8 +2,8 @@ plugins {
2
2
kotlin(" jvm" )
3
3
id(" maven-publish" )
4
4
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)
7
7
id(" kotlin-language-server.publishing-conventions" )
8
8
id(" kotlin-language-server.distribution-conventions" )
9
9
id(" kotlin-language-server.kotlin-conventions" )
@@ -19,9 +19,7 @@ application {
19
19
mainClass.set(serverMainClassName)
20
20
description = " Code completions, diagnostics and more for Kotlin"
21
21
applicationDefaultJvmArgs = listOf (" -DkotlinLanguageServer.version=$version " )
22
- applicationDistribution.into(" bin" ) {
23
- fileMode = 755
24
- }
22
+ applicationDistribution.into(" bin" ) { fileMode = 755 }
25
23
}
26
24
27
25
repositories {
@@ -40,49 +38,49 @@ dependencies {
40
38
41
39
implementation(project(" :shared" ))
42
40
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
+
45
44
implementation(kotlin(" compiler" ))
46
45
implementation(kotlin(" scripting-compiler" ))
47
46
implementation(kotlin(" scripting-jvm-host-unshaded" ))
48
47
implementation(kotlin(" sam-with-receiver-compiler-plugin" ))
49
48
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
64
64
compileOnly(kotlin(" scripting-jvm-host" ))
65
65
testCompileOnly(kotlin(" scripting-jvm-host" ))
66
66
67
- annotationProcessor(" org.openjdk.jmh:jmh- generator- annprocess" )
67
+ annotationProcessor(libs. org.openjdk.jmh. generator. annprocess)
68
68
}
69
69
70
- configurations.forEach { config ->
71
- config.resolutionStrategy {
72
- preferProjectModules()
73
- }
74
- }
70
+ configurations.forEach { config -> config.resolutionStrategy { preferProjectModules() } }
75
71
76
- tasks.startScripts {
77
- applicationName = " kotlin-language-server"
78
- }
72
+ tasks.startScripts { applicationName = " kotlin-language-server" }
79
73
80
74
tasks.register<Exec >(" fixFilePermissions" ) {
81
75
// When running on macOS or Linux the start script
82
76
// needs executable permissions to run.
83
77
84
78
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
+ )
86
84
}
87
85
88
86
tasks.register<JavaExec >(" debugRun" ) {
@@ -91,9 +89,7 @@ tasks.register<JavaExec>("debugRun") {
91
89
standardInput = System .`in `
92
90
93
91
jvmArgs(debugArgs)
94
- doLast {
95
- println (" Using debug port $debugPort " )
96
- }
92
+ doLast { println (" Using debug port $debugPort " ) }
97
93
}
98
94
99
95
tasks.register<CreateStartScripts >(" debugStartScripts" ) {
@@ -116,10 +112,6 @@ tasks.withType<Test>() {
116
112
}
117
113
}
118
114
119
- tasks.installDist {
120
- finalizedBy(" fixFilePermissions" )
121
- }
115
+ tasks.installDist { finalizedBy(" fixFilePermissions" ) }
122
116
123
- tasks.build {
124
- finalizedBy(" installDist" )
125
- }
117
+ tasks.build { finalizedBy(" installDist" ) }
0 commit comments