I am improving a Kotlin debug adapter used for e.g. VS Code:
However, I meet a problem related to access information from a Gradle project. For a Spring Boot Kotlin Gradle project, to correctly launch the built Spring Boot application, we have to pass full classpaths to java executable, including build/classes/kotlin/main, build/resources/main, etc.
By the document
https://docs.gradle.org/current/userguide/java_plugin.html#source_sets
the classpath build/resources/main is from Gradle Java plugin, and it may contain a file, application.properties, used by Spring Boot. Thus, this classpath is required by kotlin-debug-adapter to launch a Spring Boot application for debugging. My problem is how a standalone program (not a Gradle plugin), like kotlin-debug-adapter (written in Kotlin), can get these classpaths from a Gradle project. I studied Gradle Java API documents but don’t know to load a Gradle project and access its information including classpaths. Is there any API for that?