1
+ import groovy.lang.MissingPropertyException
1
2
2
3
plugins {
3
4
kotlin(" jvm" )
4
5
id(" maven-publish" )
5
6
id(" application" )
6
- id(" com.github.jk1.tcdeps" ) version " 1.2 "
7
- id(" com.jaredsburrows.license" ) version " 0.8.42 "
7
+ id(" com.github.jk1.tcdeps" )
8
+ id(" com.jaredsburrows.license" )
8
9
}
9
10
10
- val projectVersion = project.property(" projectVersion" ).toString()
11
- val kotlinVersion = project.property(" kotlinVersion" ).toString()
12
- val exposedVersion = project.property(" exposedVersion" ).toString()
13
- val lsp4jVersion = project.property(" lsp4jVersion" ).toString()
14
- val javaVersion = project.property(" javaVersion" ).toString()
11
+ val projectVersion = " 1.3.2"
15
12
val debugPort = 8000
16
13
val debugArgs = " -agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n,quiet=y"
14
+ val javaVersion = try {
15
+ project.property(" javaVersion" ).toString()
16
+ } catch (_: MissingPropertyException ) {
17
+ " 11"
18
+ }
17
19
18
20
version = projectVersion
19
21
@@ -38,31 +40,37 @@ repositories {
38
40
}
39
41
40
42
dependencies {
43
+ // dependencies are constrained to versions defined
44
+ // in /gradle/platform/build.gradle.kts
45
+ implementation(platform(" dev.fwcd.kotlin-language-server:platform" ))
46
+ annotationProcessor(platform(" dev.fwcd.kotlin-language-server:platform" ))
47
+
41
48
implementation(project(" :shared" ))
42
- implementation(" org.eclipse.lsp4j:org.eclipse.lsp4j:$lsp4jVersion " )
43
- implementation(" org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:$lsp4jVersion " )
44
- implementation(kotlin(" compiler" , version = kotlinVersion))
45
- implementation(kotlin(" scripting-compiler" , version = kotlinVersion))
46
- implementation(kotlin(" scripting-jvm-host-unshaded" , version = kotlinVersion))
47
- implementation(kotlin(" sam-with-receiver-compiler-plugin" , version = kotlinVersion))
48
- implementation(kotlin(" reflect" , version = kotlinVersion))
49
- implementation(" org.jetbrains:fernflower:1.0" )
50
- implementation(" org.jetbrains.exposed:exposed-core:$exposedVersion " )
51
- implementation(" org.jetbrains.exposed:exposed-dao:$exposedVersion " )
52
- implementation(" org.jetbrains.exposed:exposed-jdbc:$exposedVersion " )
53
- implementation(" com.h2database:h2:1.4.200" )
54
- implementation(" com.github.fwcd.ktfmt:ktfmt:b5d31d1" )
55
- implementation(" com.beust:jcommander:1.78" )
56
-
57
- testImplementation(" org.hamcrest:hamcrest-all:1.3" )
58
- testImplementation(" junit:junit:4.11" )
59
- testImplementation(" org.openjdk.jmh:jmh-core:1.20" )
49
+
50
+ implementation(" org.eclipse.lsp4j:org.eclipse.lsp4j" )
51
+ implementation(" org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc" )
52
+ implementation(kotlin(" compiler" ))
53
+ implementation(kotlin(" scripting-compiler" ))
54
+ implementation(kotlin(" scripting-jvm-host-unshaded" ))
55
+ implementation(kotlin(" sam-with-receiver-compiler-plugin" ))
56
+ implementation(kotlin(" reflect" ))
57
+ implementation(" org.jetbrains:fernflower" )
58
+ implementation(" org.jetbrains.exposed:exposed-core" )
59
+ implementation(" org.jetbrains.exposed:exposed-dao" )
60
+ implementation(" org.jetbrains.exposed:exposed-jdbc" )
61
+ implementation(" com.h2database:h2" )
62
+ implementation(" com.github.fwcd.ktfmt:ktfmt" )
63
+ implementation(" com.beust:jcommander" )
64
+
65
+ testImplementation(" org.hamcrest:hamcrest-all" )
66
+ testImplementation(" junit:junit" )
67
+ testImplementation(" org.openjdk.jmh:jmh-core" )
60
68
61
69
// See https://github.com/JetBrains/kotlin/blob/65b0a5f90328f4b9addd3a10c6f24f3037482276/libraries/examples/scripting/jvm-embeddable-host/build.gradle.kts#L8
62
- compileOnly(kotlin(" scripting-jvm-host" , version = kotlinVersion ))
63
- testCompileOnly(kotlin(" scripting-jvm-host" , version = kotlinVersion ))
70
+ compileOnly(kotlin(" scripting-jvm-host" ))
71
+ testCompileOnly(kotlin(" scripting-jvm-host" ))
64
72
65
- annotationProcessor(" org.openjdk.jmh:jmh-generator-annprocess:1.20 " )
73
+ annotationProcessor(" org.openjdk.jmh:jmh-generator-annprocess" )
66
74
}
67
75
68
76
configurations.forEach { config ->
@@ -81,16 +89,6 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
81
89
}
82
90
}
83
91
84
- tasks.register<Copy >(" copyPropertiesToTestWorkspace" ) {
85
- from(" $rootDir /gradle.properties" )
86
- into(file(" src/test/resources/additionalWorkspace" ))
87
- }
88
-
89
- tasks.register<Copy >(" copyPropertiesToDSLTestWorkspace" ) {
90
- from(" $rootDir /gradle.properties" )
91
- into(file(" src/test/resources/kotlinDSLWorkspace" ))
92
- }
93
-
94
92
tasks.register<Exec >(" fixFilePermissions" ) {
95
93
// When running on macOS or Linux the start script
96
94
// needs executable permissions to run.
@@ -123,13 +121,7 @@ tasks.register<Sync>("installDebugDist") {
123
121
finalizedBy(" debugStartScripts" )
124
122
}
125
123
126
- tasks.getByName(" processTestResources" ) {
127
- dependsOn(" copyPropertiesToTestWorkspace" , " copyPropertiesToDSLTestWorkspace" )
128
- }
129
-
130
124
tasks.withType<Test >() {
131
- dependsOn(" copyPropertiesToTestWorkspace" , " copyPropertiesToDSLTestWorkspace" )
132
-
133
125
testLogging {
134
126
events(" failed" )
135
127
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat .FULL
0 commit comments