User: joe Date: 10 Oct 26 13:03 Revision: 352e8ca627535bedb5a27397ee961fbf57cd297e Summary: Update to 2026.3 EAP TeamCity URL: http://ci.mcdev.io:80/viewModification.html?tab=vcsModificationFiles&modId=10646&personal=false Index: buildSrc/src/main/kotlin/mcdev-publishing.gradle.kts =================================================================== --- buildSrc/src/main/kotlin/mcdev-publishing.gradle.kts (revision 27fa4d23e04450ba384a8719e07a9cd7af5d8382) +++ buildSrc/src/main/kotlin/mcdev-publishing.gradle.kts (revision 352e8ca627535bedb5a27397ee961fbf57cd297e) @@ -47,53 +47,55 @@ val log = Logging.getLogger(javaClass) - val path = archiveFile.get().asFile.toPath().absolute() + val paths = archiveFiles.files.map { it.toPath() } val pluginId = "com.demonwav.minecraft-dev" + paths.forEach { path -> - channels.get().forEach { channel -> - log.info("Uploading plugin '$pluginId' from '$path' to '${host.get()}', channel: '$channel'") + channels.get().forEach { channel -> + log.info("Uploading plugin '$pluginId' from '$path' to '${host.get()}', channel: '$channel'") - try { - val repositoryClient = when (ideServices.get()) { - true -> PluginRepositoryFactory.createWithImplementationClass( - host.get(), - token.get(), - "Automation", - IdeServicesPluginRepositoryService::class.java, - ) + try { + val repositoryClient = when (ideServices.get()) { + true -> PluginRepositoryFactory.createWithImplementationClass( + host.get(), + token.get(), + "Automation", + IdeServicesPluginRepositoryService::class.java, + ) - false -> PluginRepositoryFactory.create(host.get(), token.get()) - } - val uploadBean = repositoryClient.uploader.uploadUpdateByXmlIdAndFamily( - id = pluginId, - family = ProductFamily.INTELLIJ, - file = path.toFile(), - channel = channel.takeIf { it != "default" }, - notes = null, - isHidden = hidden.get(), - ) - log.info("Uploaded successfully as version ID ${uploadBean.id}") + false -> PluginRepositoryFactory.create(host.get(), token.get()) + } + val uploadBean = repositoryClient.uploader.uploadUpdateByXmlIdAndFamily( + id = pluginId, + family = ProductFamily.INTELLIJ, + file = path.toFile(), + channel = channel.takeIf { it != "default" }, + notes = null, + isHidden = hidden.get(), + ) + log.info("Uploaded successfully as version ID ${uploadBean.id}") - val since = uploadBean.since - log.info("Since is ${since}, until is ${uploadBean.until}") - if (since != null && uploadBean.until.isNullOrBlank()) { - val newUntil = since.substringBefore(".") + ".*" - log.info("Updating until to $newUntil") - val request = HttpRequest.newBuilder() - .uri(URI.create("https://plugins.jetbrains.com/api/updates/${uploadBean.id}/since-until")) - .header("Authorization", "Bearer ${token.get()}") - .header("Content-Type", "application/json") - .header("User-Agent", "Minecraft Development Plugin Publisher") - .POST(HttpRequest.BodyPublishers.ofString("{\"since\":\"${uploadBean.since}\",\"until\":\"$newUntil\"}")) - .build() - val response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()) - if (response.statusCode() < 200 || response.statusCode() >= 300) { - throw IOException("Updating until failed with status code ${response.statusCode()}, ${response.body()}") - } - log.info("Successful with status code ${response.statusCode()}") - } - } catch (exception: Exception) { - throw GradleException("Failed to upload plugin: ${exception.message}", exception) - } - } + val since = uploadBean.since + log.info("Since is ${since}, until is ${uploadBean.until}") + if (since != null && uploadBean.until.isNullOrBlank()) { + val newUntil = since.substringBefore(".") + ".*" + log.info("Updating until to $newUntil") + val request = HttpRequest.newBuilder() + .uri(URI.create("https://plugins.jetbrains.com/api/updates/${uploadBean.id}/since-until")) + .header("Authorization", "Bearer ${token.get()}") + .header("Content-Type", "application/json") + .header("User-Agent", "Minecraft Development Plugin Publisher") + .POST(HttpRequest.BodyPublishers.ofString("{\"since\":\"${uploadBean.since}\",\"until\":\"$newUntil\"}")) + .build() + val response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()) + if (response.statusCode() < 200 || response.statusCode() >= 300) { + throw IOException("Updating until failed with status code ${response.statusCode()}, ${response.body()}") + } + log.info("Successful with status code ${response.statusCode()}") + } + } catch (exception: Exception) { + throw GradleException("Failed to upload plugin: ${exception.message}", exception) + } + } + } }) } Index: gradle/libs.versions.toml =================================================================== --- gradle/libs.versions.toml (revision 27fa4d23e04450ba384a8719e07a9cd7af5d8382) +++ gradle/libs.versions.toml (revision 352e8ca627535bedb5a27397ee961fbf57cd297e) @@ -1,20 +1,20 @@ [versions] # https://github.com/JetBrains/intellij-community/blob//.idea/libraries/kotlin_stdlib.xml -kotlin = "2.4.0" -# https://github.com/JetBrains/intellij-community/blob//.idea/libraries/kotlinx_coroutines_core.xml -coroutines = "1.10.2" +kotlin = "2.4.20" +# https://github.com/JetBrains/intellij-community/blob//libraries/kotlinx/coroutines/core/intellij.libraries.kotlinx.coroutines.core.iml +coroutines = "1.11.0" junit = "6.0.3" asm = "9.9.1" fuel = "2.3.1" licenser = "0.7.5" changelog = "2.5.0" # https://github.com/JetBrains/intellij-platform-gradle-plugin -intellij-plugin = "2.18.1" +intellij-plugin = "2.19.0" # https://central.sonatype.com/artifact/org.jetbrains.intellij/plugin-repository-rest-client intellij-plugin-repository-rest-client = "2.0.51" # https://www.jetbrains.com/intellij-repository/snapshots or https://www.jetbrains.com/intellij-repository/releases/ # Search for com.jetbrains.intellij.idea -intellij-ide = "2026.2" +intellij-ide = "263.6259.32-EAP-CANDIDATE" # https://github.com/JetBrains/gradle-idea-ext-plugin idea-ext = "1.4.1" @@ -51,7 +51,7 @@ # Gradle Tooling # https://www.jetbrains.com/intellij-repository/snapshots or https://www.jetbrains.com/intellij-repository/releases/ # Search for com.jetbrains.intellij.gradle -gradleToolingExtension = { module = "com.jetbrains.intellij.gradle:gradle-tooling-extension", version = "262.8665.258" } +gradleToolingExtension = { module = "com.jetbrains.intellij.gradle:gradle-tooling-extension", version = "263.6259.32-EAP-SNAPSHOT" } annotations = "org.jetbrains:annotations:26.1.0" asm = { module = "org.ow2.asm:asm", version.ref = "asm" } Index: src/main/kotlin/creator/custom/CreatorCredentials.kt =================================================================== --- src/main/kotlin/creator/custom/CreatorCredentials.kt (revision 27fa4d23e04450ba384a8719e07a9cd7af5d8382) +++ src/main/kotlin/creator/custom/CreatorCredentials.kt (revision 352e8ca627535bedb5a27397ee961fbf57cd297e) @@ -24,6 +24,7 @@ import com.demonwav.mcdev.creator.custom.providers.RemoteTemplateProvider.RemoteAuthType import com.github.kittinunf.fuel.core.Request import com.github.kittinunf.fuel.core.extensions.authentication +import com.intellij.collaboration.auth.AccountManager import com.intellij.collaboration.auth.ServerAccount import com.intellij.collaboration.auth.findAccountOrNull import com.intellij.credentialStore.CredentialAttributes @@ -31,7 +32,8 @@ import com.intellij.credentialStore.generateServiceName import com.intellij.ide.passwordSafe.PasswordSafe import git4idea.remote.GitHttpAuthDataProvider -import git4idea.remote.hosting.http.SilentHostedGitHttpAuthDataProvider +import git4idea.remote.hosting.http.SilentHostedGitHttpAuthDataProviderBase +import java.lang.reflect.Method import java.nio.file.Path import java.util.Properties import javax.xml.parsers.DocumentBuilderFactory @@ -42,6 +44,12 @@ import kotlin.io.path.inputStream object CreatorCredentials { + private val PROVIDER_ID_PROPERTY: Method = SilentHostedGitHttpAuthDataProviderBase::class.java + .getDeclaredMethod("getProviderId") + .also { it.isAccessible = true } + private val ACCOUNT_MANAGER_PROPERTY: Method = SilentHostedGitHttpAuthDataProviderBase::class.java + .getDeclaredMethod("getAccountManager") + .also { it.isAccessible = true } private val xmlDocumentBuilder = DocumentBuilderFactory.newDefaultInstance().newDocumentBuilder() private val xPath = XPathFactory.newDefaultInstance().newXPath() @@ -110,30 +118,37 @@ return request } - fun getGitHttpAuthProviders(): List> { + fun SilentHostedGitHttpAuthDataProviderBase<*, *>.getProviderId(): String + = PROVIDER_ID_PROPERTY.invoke(this) as String + + @Suppress("UNCHECKED_CAST") + private fun SilentHostedGitHttpAuthDataProviderBase.getAccountManager(): AccountManager + = ACCOUNT_MANAGER_PROPERTY.invoke(this) as AccountManager + + fun getGitHttpAuthProviders(): List> { return GitHttpAuthDataProvider.EP_NAME.extensionList - .filterIsInstance>() + .filterIsInstance>() } - fun findGitHttpAuthProvider(providerId: String): SilentHostedGitHttpAuthDataProvider? { - return getGitHttpAuthProviders().find { provider -> provider.providerId == providerId } + fun findGitHttpAuthProvider(providerId: String): SilentHostedGitHttpAuthDataProviderBase? { + return getGitHttpAuthProviders().find { provider -> provider.getProviderId() == providerId } } fun getGitHttpAuthAccounts(providerId: String): MutableList { - return findGitHttpAuthProvider(providerId)?.accountManager?.accountsState?.value.orEmpty().toMutableList() + return findGitHttpAuthProvider(providerId)?.getAccountManager()?.accountsState?.value.orEmpty().toMutableList() } fun findGitHttpAuthAccount(credentials: String): ServerAccount? { val providerId = credentials.substringBefore(':').takeIf(String::isNotBlank) ?: return null val accountId = credentials.substringAfter(':').takeIf(String::isNotBlank) ?: return null - val accountManager = findGitHttpAuthProvider(providerId)?.accountManager ?: return null + val accountManager = findGitHttpAuthProvider(providerId)?.getAccountManager() ?: return null return accountManager.findAccountOrNull { account -> account.id == accountId } } suspend fun findGitHttpAuthBearerToken(credentials: String): Pair? { val providerId = credentials.substringBefore(':').takeIf(String::isNotBlank) ?: return null val accountId = credentials.substringAfter(':').takeIf(String::isNotBlank) ?: return null - val accountManager = findGitHttpAuthProvider(providerId)?.accountManager ?: return null + val accountManager = findGitHttpAuthProvider(providerId)?.getAccountManager() ?: return null val account = accountManager.findAccountOrNull { account -> account.id == accountId } ?: return null val token = accountManager.findCredentials(account) ?: return null return account.name to token Index: src/main/kotlin/creator/custom/providers/RemoteTemplateProvider.kt =================================================================== --- src/main/kotlin/creator/custom/providers/RemoteTemplateProvider.kt (revision 27fa4d23e04450ba384a8719e07a9cd7af5d8382) +++ src/main/kotlin/creator/custom/providers/RemoteTemplateProvider.kt (revision 352e8ca627535bedb5a27397ee961fbf57cd297e) @@ -24,6 +24,7 @@ import com.demonwav.mcdev.asset.MCDevBundle import com.demonwav.mcdev.creator.custom.BuiltinValidations import com.demonwav.mcdev.creator.custom.CreatorCredentials +import com.demonwav.mcdev.creator.custom.CreatorCredentials.getProviderId import com.demonwav.mcdev.creator.custom.TemplateDescriptor import com.demonwav.mcdev.creator.modalityState import com.demonwav.mcdev.creator.selectProxy @@ -209,7 +210,7 @@ defaultRepo?.authCredentials.takeIf { authTypeProperty.get() == RemoteAuthType.GIT_HTTP } val gitAuthProviderProperty = propertyGraph.lazyProperty { initialGitAuthCredentials?.substringBefore(':') - ?: CreatorCredentials.getGitHttpAuthProviders().first().providerId + ?: CreatorCredentials.getGitHttpAuthProviders().first().getProviderId() } val gitAuthAccountProperty = propertyGraph.lazyProperty { initialGitAuthCredentials?.let(CreatorCredentials::findGitHttpAuthAccount) @@ -304,7 +305,7 @@ }.visibleIf(authTypeProperty.equalsTo(RemoteAuthType.BEARER)) row(MCDevBundle("creator.ui.custom.remote.git_http_provider.label")) { - comboBox(CollectionComboBoxModel(CreatorCredentials.getGitHttpAuthProviders().map { it.providerId })) + comboBox(CollectionComboBoxModel(CreatorCredentials.getGitHttpAuthProviders().map { it.getProviderId() })) .align(AlignX.FILL) .bindItem(gitAuthProviderProperty) .validationOnApply { box -> Index: src/main/kotlin/platform/mcp/at/AtSyntaxHighlighter.kt =================================================================== --- src/main/kotlin/platform/mcp/at/AtSyntaxHighlighter.kt (revision 27fa4d23e04450ba384a8719e07a9cd7af5d8382) +++ src/main/kotlin/platform/mcp/at/AtSyntaxHighlighter.kt (revision 352e8ca627535bedb5a27397ee961fbf57cd297e) @@ -32,7 +32,7 @@ override fun getHighlightingLexer() = AtLexerAdapter() - override fun getTokenHighlights(tokenType: IElementType?): Array = + override fun getTokenHighlights(tokenType: IElementType): Array = when (tokenType) { AtTypes.KEYWORD_ELEMENT -> KEYWORD_KEYS AtTypes.CLASS_NAME_ELEMENT -> CLASS_NAME_KEYS Index: src/main/kotlin/platform/mcp/fabricloom/TinyUnscrambler.kt =================================================================== --- src/main/kotlin/platform/mcp/fabricloom/TinyUnscrambler.kt (revision 27fa4d23e04450ba384a8719e07a9cd7af5d8382) +++ src/main/kotlin/platform/mcp/fabricloom/TinyUnscrambler.kt (revision 352e8ca627535bedb5a27397ee961fbf57cd297e) @@ -26,6 +26,7 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.project.ProjectManager import com.intellij.openapi.ui.ComboBox +import com.intellij.ui.CollectionComboBoxModel import com.intellij.ui.components.JBLabel import com.intellij.ui.dsl.listCellRenderer.textListCellRenderer import com.intellij.uiDesigner.core.GridConstraints @@ -34,12 +35,10 @@ import java.awt.Dimension import java.nio.file.Path import java.nio.file.Paths -import javax.swing.ComboBoxModel import javax.swing.JPanel import net.fabricmc.mappingio.MappedElementKind import net.fabricmc.mappingio.MappingReader import net.fabricmc.mappingio.MappingVisitor -import org.jdesktop.swingx.combobox.MapComboBoxModel import org.jetbrains.plugins.gradle.util.GradleUtil class TinyUnscrambler : UnscrambleSupport { @@ -48,14 +47,13 @@ override fun getPresentableName() = "Remap Tiny names" - class SettingsComponent(mappings: Map) : JPanel(GridLayoutManager(1, 2)) { + class SettingsComponent(val mappings: Map) : JPanel(GridLayoutManager(1, 2)) { - val mappingsBoxModel: MapComboBoxModel = MapComboBoxModel(mappings) @Suppress("UNCHECKED_CAST") - val mappingsBox: ComboBox = ComboBox(mappingsBoxModel as ComboBoxModel) + val mappingsBox: ComboBox = ComboBox(CollectionComboBoxModel(mappings.keys.toList())) init { - mappingsBox.renderer = textListCellRenderer { "[$it] ${mappingsBoxModel.getValue(it)}" } + mappingsBox.renderer = textListCellRenderer { "[$it] ${mappings[it]}" } add( JBLabel("Mappings: "), GridConstraints( @@ -110,7 +108,7 @@ override fun unscramble(project: Project, text: String, logName: String, settings: SettingsComponent?): String? { val mappingsFile = logName.takeIf(String::isNotBlank)?.let(Paths::get) - ?: settings?.mappingsBoxModel?.let { mappings -> mappings.selectedItem?.let(mappings::getValue) } + ?: settings?.mappings?.let { mappings -> settings.mappingsBox.selectedItem?.let(mappings::get) } ?: return null val interToNamed = mutableMapOf() Index: src/main/kotlin/translations/lang/colors/LangSyntaxHighlighter.kt =================================================================== --- src/main/kotlin/translations/lang/colors/LangSyntaxHighlighter.kt (revision 27fa4d23e04450ba384a8719e07a9cd7af5d8382) +++ src/main/kotlin/translations/lang/colors/LangSyntaxHighlighter.kt (revision 352e8ca627535bedb5a27397ee961fbf57cd297e) @@ -30,7 +30,7 @@ class LangSyntaxHighlighter(private val lexer: Lexer) : SyntaxHighlighterBase() { override fun getHighlightingLexer() = lexer - override fun getTokenHighlights(tokenType: IElementType?) = + override fun getTokenHighlights(tokenType: IElementType) = when (tokenType) { LangTypes.KEY, LangTypes.DUMMY -> KEY_KEYS LangTypes.EQUALS -> EQUALS_KEYS