33 *
44 * https://mcdev.io/
55 *
6- * Copyright (C) 2025 minecraft-dev
6+ * Copyright (C) 2026 minecraft-dev
77 *
88 * This program is free software: you can redistribute it and/or modify
99 * it under the terms of the GNU Lesser General Public License as published
1818 * along with this program. If not, see <https://www.gnu.org/licenses/>.
1919 */
2020
21+ @file:JvmName(" PlatformVersion" )
22+
2123package com.demonwav.mcdev.creator
2224
23- import com.demonwav.mcdev.platform.PlatformType
2425import com.demonwav.mcdev.update.PluginUtil
2526import com.demonwav.mcdev.util.fromJson
27+ import com.demonwav.mcdev.util.loggerForTopLevel
2628import com.demonwav.mcdev.util.mapFirstNotNull
2729import com.demonwav.mcdev.util.withSuppressed
2830import com.github.kittinunf.fuel.core.FuelManager
2931import com.github.kittinunf.fuel.core.requests.suspendable
3032import com.github.kittinunf.fuel.coroutines.awaitString
3133import com.google.gson.Gson
3234import com.intellij.openapi.diagnostic.Attachment
33- import com.intellij.openapi.diagnostic.logger
3435import com.intellij.util.net.JdkProxyProvider
3536import java.io.IOException
3637import java.net.Proxy
@@ -52,12 +53,7 @@ private const val OVH_BASE_URL = "https://versions.denwav.com/versions/"
5253
5354private val URLS = listOf (CLOUDFLARE_BASE_URL , GITHUB_BASE_URL , OVH_BASE_URL )
5455
55- val PLATFORM_VERSION_LOGGER = logger<PlatformVersion >()
56-
57- suspend fun getVersionSelector (type : PlatformType ): PlatformVersion {
58- val versionJson = type.versionJson ? : throw UnsupportedOperationException (" Incorrect platform type: $type " )
59- return getVersionJson(versionJson)
60- }
56+ val PLATFORM_VERSION_LOGGER = loggerForTopLevel()
6157
6258suspend inline fun <reified T : Any > getVersionJson (path : String ): T {
6359 return getVersionJson(path, T ::class )
@@ -112,5 +108,3 @@ fun selectProxy(urlText: String): Proxy? {
112108 }
113109 return null
114110}
115-
116- data class PlatformVersion (var versions : List <String >, var selectedIndex : Int )
0 commit comments