bundle amplicode 2025.3.2-261 version

This commit is contained in:
Nikita Iarychenko
2026-08-06 12:13:42 +04:00
parent 459114464d
commit ab5410bf4c
+18 -10
View File
@@ -27,10 +27,11 @@ object OpenIdePluginBundler {
private const val DOWNLOADABLE_PLUGINS_DIR = "build/download/plugins"
private const val PLUGINS_DOWNLOAD_URL = "https://plugins.openide.ru/pluginManager"
private const val PLUGIN_DOWNLOAD_BY_VERSION_URL = "https://plugins.openide.ru/plugin/download"
private val plugins = listOf(
PluginInfo("com.haulmont.intellij.rupack", "ru_pack"),
PluginInfo("com.haulmont.amplicode", "amplicode"),
PluginInfo("com.haulmont.amplicode", "amplicode", version = "2025.3.2-261"),
PluginInfo("ru.openide.pro.updater", "updater")
)
@@ -49,20 +50,27 @@ object OpenIdePluginBundler {
}
private suspend fun bundlePluginFromMarketplace(context: BuildContext, pluginInfo: PluginInfo) {
val parameters = hashMapOf(
"id" to pluginInfo.pluginId,
"build" to context.fullBuildNumber
)
val url = if (pluginInfo.version != null) {
Urls.newFromEncoded(PLUGIN_DOWNLOAD_BY_VERSION_URL)
.addParameters(hashMapOf(
"pluginId" to pluginInfo.pluginId,
"version" to pluginInfo.version
))
}
else {
Urls.newFromEncoded(PLUGINS_DOWNLOAD_URL)
.addParameters(hashMapOf(
"id" to pluginInfo.pluginId,
"build" to context.fullBuildNumber
))
}
val uri = Urls.newFromEncoded(PLUGINS_DOWNLOAD_URL)
.addParameters(parameters)
.toExternalForm()
.let(URI::create)
val uri = url.toExternalForm().let(URI::create)
val archivePath = BuildDependenciesDownloader.downloadFileToCacheLocation(COMMUNITY_ROOT, uri)
val targetDir = context.paths.communityHomeDir.resolve("$DOWNLOADABLE_PLUGINS_DIR/${pluginInfo.folderName}")
BuildDependenciesDownloader.extractFile(archivePath, targetDir, COMMUNITY_ROOT, BuildDependenciesExtractOptions.STRIP_ROOT)
}
private class PluginInfo(val pluginId: String, val folderName: String)
private class PluginInfo(val pluginId: String, val folderName: String, val version: String? = null)
}