import org.jetbrains.changelog.Changelog import org.jetbrains.changelog.markdownToHTML import org.jetbrains.intellij.platform.gradle.TestFrameworkType plugins { id("java") // alias(libs.plugins.kotlin) alias(libs.plugins.intellij.platform) alias(libs.plugins.changelog) alias(libs.plugins.qodana) alias(libs.plugins.kover) alias(libs.plugins.gradle.ktlint) } group = providers.gradleProperty("pluginGroup").get() version = providers.gradleProperty("pluginVersion").get() //kotlin { // jvmToolchain(17) //} repositories { mavenLocal() mavenCentral() intellijPlatform { defaultRepositories() localPlatformArtifacts() } } dependencies { intellijPlatform { // androidStudio("2025.1.1") create( providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion") ) bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') }) plugins(providers.gradleProperty("platformPlugins").map { it.split(',') }) // testFramework(TestFrameworkType.Platform) } } intellijPlatform { pluginConfiguration { name = providers.gradleProperty("pluginName") version = providers.gradleProperty("pluginVersion") description = providers.gradleProperty("pluginDescription") val changelog = project.changelog changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion -> with(changelog) { renderItem( (getOrNull(pluginVersion) ?: getUnreleased()) .withHeader(false) .withEmptySections(false), Changelog.OutputType.HTML, ) } } ideaVersion { sinceBuild = providers.gradleProperty("pluginSinceBuild") untilBuild = providers.gradleProperty("pluginUntilBuild") } } pluginVerification { ides { recommended() } } } changelog { groups.empty() repositoryUrl = providers.gradleProperty("pluginRepositoryUrl") } kover { reports { total { xml { onCheck = true } } } } tasks { // wrapper { // gradleVersion = providers.gradleProperty("gradleVersion").get() // } publishPlugin { dependsOn(patchChangelog) } } intellijPlatformTesting { runIde { register("runIdeForUiTests") { task { jvmArgumentProviders += CommandLineArgumentProvider { listOf( "-Drobot-server.port=8082", "-Dide.mac.message.dialogs.as.sheets=false", "-Djb.privacy.policy.text=", "-Djb.consents.confirmation.enabled=false", ) } } plugins { robotServerPlugin() } } } }