2020-06-17 21:06:57 +02:00
|
|
|
import org.jetbrains.changelog.markdownToHTML
|
2024-04-16 23:54:27 +02:00
|
|
|
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
|
2020-05-05 08:29:16 +02:00
|
|
|
|
|
|
|
|
plugins {
|
2026-04-13 20:49:44 +02:00
|
|
|
id("org.jetbrains.kotlin.jvm")
|
|
|
|
|
id("org.jetbrains.intellij.platform")
|
|
|
|
|
id("org.jetbrains.changelog")
|
2020-05-05 08:29:16 +02:00
|
|
|
}
|
|
|
|
|
|
2023-04-04 17:17:47 +02:00
|
|
|
dependencies {
|
2026-04-13 16:59:16 +02:00
|
|
|
testImplementation("junit:junit:4.13.2")
|
2022-03-16 21:44:30 +01:00
|
|
|
|
2024-02-20 22:49:22 +01:00
|
|
|
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
|
|
|
|
|
intellijPlatform {
|
2026-04-13 16:57:51 +02:00
|
|
|
intellijIdea("2025.2.6.1")
|
2024-06-14 21:20:18 +02:00
|
|
|
testFramework(TestFrameworkType.Platform)
|
2024-02-27 13:53:36 +01:00
|
|
|
}
|
2024-02-20 22:49:22 +01:00
|
|
|
}
|
2021-07-05 12:24:43 +02:00
|
|
|
|
2024-02-20 22:49:22 +01:00
|
|
|
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
|
|
|
|
|
intellijPlatform {
|
|
|
|
|
pluginConfiguration {
|
2020-06-17 21:06:57 +02:00
|
|
|
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
|
2024-02-20 22:49:22 +01:00
|
|
|
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
|
2023-02-06 12:50:54 +01:00
|
|
|
val start = "<!-- Plugin description -->"
|
|
|
|
|
val end = "<!-- Plugin description end -->"
|
|
|
|
|
|
2024-05-30 09:27:41 +02:00
|
|
|
with(it.lines()) {
|
2023-02-06 12:50:54 +01:00
|
|
|
if (!containsAll(listOf(start, end))) {
|
|
|
|
|
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
|
|
|
|
|
}
|
|
|
|
|
subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML)
|
2023-01-27 10:23:20 +01:00
|
|
|
}
|
2023-04-13 05:51:50 +10:00
|
|
|
}
|
2024-02-20 22:49:22 +01:00
|
|
|
}
|
|
|
|
|
}
|