build.gradle.kts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. plugins {
  2. kotlin("jvm")
  3. id("org.jetbrains.intellij.platform") version "2.7.2"
  4. }
  5. group = "io.xmake.debug"
  6. version = "1.0.0"
  7. repositories {
  8. mavenCentral()
  9. intellijPlatform {
  10. defaultRepositories()
  11. }
  12. }
  13. intellijPlatform {
  14. dependencies {
  15. intellijPlatform {
  16. clion("2025.3")
  17. bundledPlugin("com.intellij.nativeDebug")
  18. }
  19. }
  20. // Disable plugin verification and runIDE for the debug module
  21. pluginVerification {
  22. ides { }
  23. }
  24. }
  25. // Disable buildSearchableOptions for CLion module only (due to traverseUI issues)
  26. tasks.matching { task -> task.name.contains("buildSearchableOptions") }.configureEach {
  27. enabled = false
  28. }
  29. // Disable runIde for CLion module (should not run IDE from debug module)
  30. tasks.matching { task -> task.name.contains("runIde") }.configureEach {
  31. enabled = false
  32. }
  33. tasks {
  34. compileKotlin {
  35. compilerOptions.jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
  36. }
  37. compileJava {
  38. options.release.set(17)
  39. }
  40. jar {
  41. archiveBaseName.set("xmake-clion-debug")
  42. archiveVersion.set("")
  43. archiveClassifier.set("")
  44. // Include all dependencies in the JAR so it's self-contained
  45. from({
  46. configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
  47. }) {
  48. exclude("META-INF/*.SF")
  49. exclude("META-INF/*.DSA")
  50. exclude("META-INF/*.RSA")
  51. }
  52. manifest {
  53. attributes(
  54. "Main-Class" to "io.xmake.debug.clion.ClionDebugModule",
  55. "Implementation-Title" to "XMake CLion Debug Module",
  56. "Implementation-Version" to project.version,
  57. "Implementation-Vendor" to "XMake"
  58. )
  59. }
  60. }
  61. // Create a task to copy the JAR to the main plugin resources/lib
  62. register<Copy>("copyToPluginResources") {
  63. dependsOn(jar)
  64. from(jar.get())
  65. into("../src/main/resources/lib")
  66. }
  67. }