Created
September 16, 2021 09:28
-
-
Save lzimd/9e13c755b748dc2fda3091c7aa7eb920 to your computer and use it in GitHub Desktop.
intellij-community JdkList
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/JetBrains/intellij-community/blob/idea/212.5284.40/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/jdkDownloader/JdkList.kt | |
@Service | |
class JdkListDownloader : JdkListDownloaderBase() { | |
companion object { | |
@JvmStatic | |
fun getInstance() = service<JdkListDownloader>() | |
} | |
override val feedUrl: String | |
get() { | |
val registry = runCatching { Registry.get("jdk.downloader.url").asString() }.getOrNull() | |
if (!registry.isNullOrBlank()) return registry | |
return "https://download.jetbrains.com/jdk/feed/v1/jdks.json.xz" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment