Skip to content

Commit 0ec5d60

Browse files
committed
Publish the plugin update and mark it as hidden to prevent public release after approval, using the publishPlugin.hidden property.
1 parent 366e84b commit 0ec5d60

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Added
66

7+
- Publish the plugin update and mark it as hidden to prevent public release after approval, using the `publishPlugin.hidden` property.
78
- PatchPluginXmlTask: Wrap the content passed to `<change-notes>` and `<description>` elements with `<![CDATA[ ... ]]>` [#1498](../../issues/1498)
89

910
### Fixed

src/main/kotlin/org/jetbrains/intellij/IntelliJPlugin.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,7 @@ abstract class IntelliJPlugin : Plugin<Project> {
14571457
host.convention(MARKETPLACE_HOST)
14581458
toolboxEnterprise.convention(false)
14591459
channels.convention(listOf("default"))
1460+
hidden.convention(false)
14601461

14611462
distributionFile.convention(
14621463
signPluginTaskProvider

src/main/kotlin/org/jetbrains/intellij/tasks/PublishPluginTask.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ abstract class PublishPluginTask : DefaultTask() {
6969
@get:Optional
7070
abstract val channels: ListProperty<String>
7171

72+
/**
73+
* Publish the plugin update and mark it as hidden to prevent public release after approval.
74+
* See: https://plugins.jetbrains.com/docs/marketplace/hidden-plugin.html
75+
*/
76+
@get:Input
77+
@get:Optional
78+
abstract val hidden: Property<Boolean>
79+
7280
/**
7381
* Specifies if the Toolbox Enterprise plugin repository service should be used.
7482
*
@@ -110,7 +118,13 @@ abstract class PublishPluginTask : DefaultTask() {
110118

111119
false -> PluginRepositoryFactory.create(host.get(), token.get())
112120
}
113-
repositoryClient.uploader.upload(pluginId as StringPluginId, path.toFile(), channel.takeIf { it != "default" }, null)
121+
repositoryClient.uploader.upload(
122+
id = pluginId as StringPluginId,
123+
file = path.toFile(),
124+
channel = channel.takeIf { it != "default" },
125+
notes = null,
126+
isHidden = hidden.get(),
127+
)
114128
info(context, "Uploaded successfully")
115129
} catch (exception: Exception) {
116130
throw TaskExecutionException(this, GradleException("Failed to upload plugin: ${exception.message}", exception))

0 commit comments

Comments
 (0)