2022-10-29 23:19:38 +02:00
|
|
|
import org.jetbrains.changelog.Changelog
|
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
|
|
|
}
|
|
|
|
|
|
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 {
|
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
|
|
|
}
|
2020-06-17 21:06:57 +02:00
|
|
|
|
2023-01-27 14:28:15 +01:00
|
|
|
val changelog = project.changelog // local variable for configuration cache compatibility
|
2020-06-17 21:06:57 +02:00
|
|
|
// Get the latest available change notes from the changelog file
|
2026-04-13 20:49:59 +02:00
|
|
|
changeNotes = version.map { pluginVersion ->
|
2022-10-29 23:19:38 +02:00
|
|
|
with(changelog) {
|
|
|
|
|
renderItem(
|
2023-02-24 14:07:20 +01:00
|
|
|
(getOrNull(pluginVersion) ?: getUnreleased())
|
|
|
|
|
.withHeader(false)
|
|
|
|
|
.withEmptySections(false),
|
2022-10-29 23:19:38 +02:00
|
|
|
Changelog.OutputType.HTML,
|
|
|
|
|
)
|
|
|
|
|
}
|
2023-04-13 05:51:50 +10:00
|
|
|
}
|
2021-06-08 23:05:58 +02:00
|
|
|
}
|
2020-05-05 08:29:16 +02:00
|
|
|
}
|
2024-02-20 22:49:22 +01:00
|
|
|
|
|
|
|
|
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
|
|
|
|
|
changelog {
|
|
|
|
|
groups.empty()
|
2024-07-29 07:57:55 +02:00
|
|
|
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
|
2026-01-19 12:48:40 +01:00
|
|
|
versionPrefix = ""
|
2024-02-20 22:49:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
|
publishPlugin {
|
|
|
|
|
dependsOn(patchChangelog)
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-19 20:06:16 +02:00
|
|
|
|
2024-08-09 14:40:34 +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
|
|
|
|
2024-08-09 14:40:34 +02:00
|
|
|
plugins {
|
|
|
|
|
robotServerPlugin()
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-19 20:06:16 +02:00
|
|
|
}
|
|
|
|
|
}
|