Files
JetBrains_intellij-platform…/build.gradle.kts

37 lines
1.4 KiB
Kotlin
Raw Normal View History

import org.jetbrains.changelog.markdownToHTML
2024-04-16 23:54:27 +02:00
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
plugins {
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.intellij.platform")
id("org.jetbrains.changelog")
}
2023-04-04 17:17:47 +02:00
dependencies {
testImplementation("junit:junit:4.13.2")
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
intellijIdea("2025.2.6.1")
2024-06-14 21:20:18 +02:00
testFramework(TestFrameworkType.Platform)
}
}
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
pluginConfiguration {
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
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)
}
}
}
}