OPENIDE #81 Integration of Russian locale into OpenIDE

This commit is contained in:
Nikita Iarychenko
2025-01-23 13:53:00 +04:00
parent 5861092705
commit be1af3585d
2 changed files with 7 additions and 3 deletions

View File

@@ -14,20 +14,24 @@ import java.nio.file.Path
object OpenIdePluginBundler {
private const val PLUGINS_DIR = "build/download/plugins"
private const val DOWNLOADABLE_PLUGINS_DIR = "build/download/plugins"
private const val PHYSICAL_PLUGINS_DIR = "build/bundled-plugins"
private const val AMPLICODE_URL = "https://amplicode.ru"
private const val AMPLICODE_MARKETPLACE_URL = "https://amplicode.ru/jetbrains-marketplace"
fun getBundlePluginPaths(context: BuildContext): List<Path> {
val communityHomeDir = context.paths.communityHomeDir
return listOf(Path.of("${communityHomeDir}/$PLUGINS_DIR/amplicode"))
return listOf(
Path.of("${communityHomeDir}/$DOWNLOADABLE_PLUGINS_DIR/amplicode"),
Path.of("${communityHomeDir}/$PHYSICAL_PLUGINS_DIR/ru_pack")
)
}
fun bundleAmplicodePlugin(context: BuildContext) {
val majorVersion = context.buildNumber.substringBefore('.')
val uri = resolveAmplicodeUri(majorVersion)
val archivePath = BuildDependenciesDownloader.downloadFileToCacheLocation(COMMUNITY_ROOT, uri)
val targetDir = context.paths.communityHomeDir.resolve("$PLUGINS_DIR/amplicode")
val targetDir = context.paths.communityHomeDir.resolve("$DOWNLOADABLE_PLUGINS_DIR/amplicode")
BuildDependenciesDownloader.extractFile(archivePath, targetDir, COMMUNITY_ROOT, BuildDependenciesExtractOptions.STRIP_ROOT)
}