Files
JetBrains_intellij-platform…/build.gradle.kts

86 lines
3.0 KiB
Kotlin
Raw Normal View History

import org.jetbrains.changelog.Changelog
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")
}
2025-11-08 00:46:21 +03:00
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/version_catalogs.html
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)
}
}
2023-01-27 14:28:15 +01:00
val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
changeNotes = version.map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
.withHeader(false)
.withEmptySections(false),
Changelog.OutputType.HTML,
)
}
}
}
}
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
versionPrefix = ""
}
tasks {
publishPlugin {
dependsOn(patchChangelog)
}
}
2024-07-19 20:06:16 +02:00
intellijPlatformTesting {
runIde {
register("runIdeForUiTests") {
task {
jvmArgumentProviders += CommandLineArgumentProvider {
listOf(
"-Drobot-server.port=8082",
"-Dide.mac.message.dialogs.as.sheets=false",
"-Djb.privacy.policy.text=<!--999.999-->",
"-Djb.consents.confirmation.enabled=false",
)
}
}
2024-07-19 20:06:16 +02:00
plugins {
robotServerPlugin()
}
}
2024-07-19 20:06:16 +02:00
}
}