1+ import groovy.lang.MissingPropertyException
12
23plugins {
34 kotlin(" jvm" )
45 id(" maven-publish" )
56 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" )
89}
910
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"
1512val debugPort = 8000
1613val 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+ }
1719
1820version = projectVersion
1921
@@ -38,31 +40,37 @@ repositories {
3840}
3941
4042dependencies {
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+
4148 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" )
6068
6169 // 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" ))
6472
65- annotationProcessor(" org.openjdk.jmh:jmh-generator-annprocess:1.20 " )
73+ annotationProcessor(" org.openjdk.jmh:jmh-generator-annprocess" )
6674}
6775
6876configurations.forEach { config ->
@@ -81,16 +89,6 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
8189 }
8290}
8391
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-
9492tasks.register<Exec >(" fixFilePermissions" ) {
9593 // When running on macOS or Linux the start script
9694 // needs executable permissions to run.
@@ -123,13 +121,7 @@ tasks.register<Sync>("installDebugDist") {
123121 finalizedBy(" debugStartScripts" )
124122}
125123
126- tasks.getByName(" processTestResources" ) {
127- dependsOn(" copyPropertiesToTestWorkspace" , " copyPropertiesToDSLTestWorkspace" )
128- }
129-
130124tasks.withType<Test >() {
131- dependsOn(" copyPropertiesToTestWorkspace" , " copyPropertiesToDSLTestWorkspace" )
132-
133125 testLogging {
134126 events(" failed" )
135127 exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat .FULL
0 commit comments