Skip to content

Commit 8c8af7c

Browse files
committed
Drop Java 8 support and update shared module
1 parent f128b04 commit 8c8af7c

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

adapter/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ version = projectVersion
99
mainClassName = 'org.javacs.ktda.KDAMainKt'
1010
description = 'Debug Adapter for Kotlin'
1111

12-
sourceCompatibility = 1.8
13-
targetCompatibility = 1.8
14-
1512
startScripts {
1613
applicationName = "kotlin-debug-adapter"
1714
}
@@ -25,7 +22,7 @@ dependencies {
2522
implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j.debug:0.10.0'
2623
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
2724
implementation 'org.jetbrains.kotlin:kotlin-reflect'
28-
implementation 'com.github.fwcd.kotlin-language-server:shared:fb2c4f58aec6738ee2b66afb583ab51e2c424ebb'
25+
implementation 'com.github.fwcd.kotlin-language-server:shared:c7e08424e9f5237c594c38ab51af475e40d256f2'
2926
// The Java Debug Interface classes (com.sun.jdi.*)
3027
implementation files("${System.properties['java.home']}/../lib/tools.jar")
3128
testImplementation 'junit:junit:4.12'

adapter/src/main/kotlin/org/javacs/ktda/adapter/KotlinDebugAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class KotlinDebugAdapter(
103103
setupCommonInitializationParams(args)
104104

105105
val config = LaunchConfiguration(
106-
debugClassPathResolver(listOf(projectRoot)).classpathOrEmpty,
106+
debugClassPathResolver(listOf(projectRoot)).classpathOrEmpty.map { it.compiledJar }.toSet(),
107107
mainClass,
108108
projectRoot,
109109
vmArguments

adapter/src/main/kotlin/org/javacs/ktda/classpath/ProjectClassesResolver.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ package org.javacs.ktda.classpath
22

33
import java.nio.file.Path
44
import java.nio.file.Files
5+
import org.javacs.kt.classpath.ClassPathEntry
56
import org.javacs.kt.classpath.ClassPathResolver
67

78
/** Resolver for the project's own (compiled) class files. */
89
internal class ProjectClassesResolver(private val projectRoot: Path) : ClassPathResolver {
910
override val resolverType: String = "Project classes"
10-
override val classpath: Set<Path> get() = sequenceOf(
11+
override val classpath: Set<ClassPathEntry> get() = sequenceOf(
1112
// Gradle
1213
sequenceOf("kotlin", "java").flatMap { language ->
1314
sequenceOf("main", "test").flatMap { sourceSet ->
@@ -22,7 +23,7 @@ internal class ProjectClassesResolver(private val projectRoot: Path) : ClassPath
2223
sequenceOf(resolveIfExists(projectRoot, "target", "classes")),
2324
// Spring Boot application.properties and templates.
2425
sequenceOf(resolveIfExists(projectRoot, "build", "resources", "main"))
25-
).flatten().filterNotNull().toSet()
26+
).flatten().filterNotNull().map(::ClassPathEntry).toSet()
2627
}
2728

2829
/** Joins the segments to a path and returns it if it exists or null otherwise. */

0 commit comments

Comments
 (0)