In idea plugin gradle project, how to add {idea}/lib/{libname}.jar to project
已回答
In build.gradle.kts, I use following
```
intellij {
downloadSources.set(true)
type.set("CL")
version.set("2023.2.1")
plugins.set(listOf(/* Plugin Dependencies */))
}
```
I hope custom clion test conf in my code, so I
```
import com.jetbrains.cidr.cpp.execution.CMakeAppRunConfiguration
```
it raise err “Unresolved reference: CMakeAppRunConfiguration”
I'm sure CMakeAppRunConfiguration in {clion_dir}/lib/clion-ide.jar, I can import this jar with abs path, but I wanna find elegant way to import it
请先登录再写评论。
I find the solution, jar xf path/to/clion-ide.jar, see its plugin.xml id, for ex
```
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
<id>com.intellij.clion</id>
```
in build.gradle.kts add this plugin id
```
intellij {
// downloadSources.set(true)
type.set("CL")
version.set("2023.2.1")
plugins.set(listOf("com.intellij.clion"))
}
```
and in plugin.xml add
<depends>com.intellij.modules.clion</depends>
Thanks for posting the solution. For future readers, see also: