From 27397f41314c7504eae748393d9483d7fce653b4 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Fri, 22 Mar 2019 17:52:27 +0300 Subject: [PATCH] Use xmlId for fetching release date (KT-30388) --- .../jetbrains/kotlin/idea/KotlinPluginUpdater.kt | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt b/idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt index 595a49d1f12..634f2f91ff3 100644 --- a/idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt +++ b/idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt @@ -338,23 +338,9 @@ class KotlinPluginUpdater(private val propertiesComponent: PropertiesComponent) var channel: String? = null } - // TODO: remove when fetching by string id is implemented - private fun toMarketplaceId(pluginId: PluginId): Int { - return when (pluginId.idString) { - "org.jetbrains.kotlin" -> 6954 - "org.jetbrains.kotlin.native.clion" -> 10454 - "org.jetbrains.kotlin.native.appcode" -> 10619 - else -> { - LOG.error("Unknown plugin id: ${pluginId.idString}") - 6954 - } - } - } - @Throws(IOException::class, ResponseParseException::class) fun fetchPluginReleaseDate(pluginId: PluginId, version: String, channel: String?): LocalDate? { - val marketplaceId = toMarketplaceId(pluginId) - val url = "https://plugins.jetbrains.com/api/plugins/$marketplaceId/updates/version/$version" + val url = "https://plugins.jetbrains.com/api/plugins/${pluginId.idString}/updates?version=$version" val pluginDTOs: Array = try { HttpRequests.request(url).connect {