User: joe Date: 10 Nov 26 02:11 Revision: 66bf36f8346d1a2192547bbd1a80515ef5516b48 Summary: Build against 2026.3 release and fix deprecations TeamCity URL: http://ci.mcdev.io:80/viewModification.html?tab=vcsModificationFiles&modId=10695&personal=false Index: gradle/libs.versions.toml =================================================================== --- gradle/libs.versions.toml (revision 4c112ebe7631dfc1e90ba548ba7b3928ff6f7a72) +++ gradle/libs.versions.toml (revision 66bf36f8346d1a2192547bbd1a80515ef5516b48) @@ -1,6 +1,6 @@ [versions] # https://github.com/JetBrains/intellij-community/blob//.idea/libraries/kotlin_stdlib.xml -kotlin = "2.4.20" +kotlin = "2.4.21" # 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" @@ -14,7 +14,7 @@ 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 = "263.6259.32-EAP-CANDIDATE" +intellij-ide = "2026.3" # 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 = "263.6259.32-EAP-SNAPSHOT" } +gradleToolingExtension = { module = "com.jetbrains.intellij.gradle:gradle-tooling-extension", version = "263.7307.200" } annotations = "org.jetbrains:annotations:26.1.0" asm = { module = "org.ow2.asm:asm", version.ref = "asm" } Index: src/main/kotlin/asset/MCDevBundle.kt =================================================================== --- src/main/kotlin/asset/MCDevBundle.kt (revision 4c112ebe7631dfc1e90ba548ba7b3928ff6f7a72) +++ src/main/kotlin/asset/MCDevBundle.kt (revision 66bf36f8346d1a2192547bbd1a80515ef5516b48) @@ -3,7 +3,7 @@ * * https://mcdev.io/ * - * Copyright (C) 2025 minecraft-dev + * Copyright (C) 2026 minecraft-dev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -28,16 +28,22 @@ @NonNls private const val BUNDLE = "messages.MinecraftDevelopment" -object MCDevBundle : DynamicBundle(BUNDLE) { +object MCDevBundle { + private val bundle = DynamicBundle(MCDevBundle::class.java, BUNDLE) + operator fun invoke(@PropertyKey(resourceBundle = BUNDLE) key: String): String { - return getMessage(key) + return bundle.getMessage(key) } operator fun invoke(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any?): String { - return getMessage(key, *params) + return bundle.getMessage(key, *params) } + fun messageOrNull(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String? { + return bundle.messageOrNull(key, *params) + } + fun pointer(@PropertyKey(resourceBundle = BUNDLE) key: String) = Supplier { invoke(key) } fun pointer(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any?) = Index: src/main/kotlin/insight/generation/EventGenHelper.kt =================================================================== --- src/main/kotlin/insight/generation/EventGenHelper.kt (revision 4c112ebe7631dfc1e90ba548ba7b3928ff6f7a72) +++ src/main/kotlin/insight/generation/EventGenHelper.kt (revision 66bf36f8346d1a2192547bbd1a80515ef5516b48) @@ -33,13 +33,8 @@ import com.intellij.psi.PsiFile import com.intellij.psi.codeStyle.CodeStyleManager import com.intellij.psi.util.parentOfType -import org.jetbrains.kotlin.K1Deprecation -import org.jetbrains.kotlin.analysis.api.KaIdeApi -import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferences -import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferencesInRange import org.jetbrains.kotlin.idea.base.codeInsight.ShortenReferencesFacility -import org.jetbrains.kotlin.idea.base.plugin.KotlinPluginMode -import org.jetbrains.kotlin.idea.base.plugin.KotlinPluginModeProvider +import org.jetbrains.kotlin.idea.base.psi.addSuperType import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.psi.KtPsiFactory @@ -113,13 +108,9 @@ val factory = KtPsiFactory.contextual(context) val entry = factory.createSuperTypeEntry(fqn) - val insertedEntry = ktClass.addSuperTypeListEntry(entry) - when (KotlinPluginModeProvider.currentPluginMode) { - KotlinPluginMode.K1 -> @OptIn(K1Deprecation::class) ShortenReferencesFacility.getInstance().shorten(insertedEntry) - // TODO find a non-internal alternative to this... - KotlinPluginMode.K2 -> @OptIn(KaIdeApi::class) shortenReferences(insertedEntry) + val insertedEntry = ktClass.addSuperType(entry) + ShortenReferencesFacility.getInstance().shorten(insertedEntry) - } + } - } override fun reformatAndShortenRefs(file: PsiFile, startOffset: Int, endOffset: Int) { if (file !is KtFile) { @@ -128,10 +119,6 @@ val project = file.project val marker = JvmEventGenHelper.doReformat(project, file, startOffset, endOffset) ?: return - when (KotlinPluginModeProvider.currentPluginMode) { - KotlinPluginMode.K1 -> @OptIn(K1Deprecation::class) ShortenReferencesFacility.getInstance().shorten(file, marker.textRange) - // TODO find a non-internal alternative to this... - KotlinPluginMode.K2 -> @OptIn(KaIdeApi::class) shortenReferencesInRange(file, marker.textRange) + ShortenReferencesFacility.getInstance().shorten(file, marker.textRange) - } - } + } +} -} Index: src/main/kotlin/platform/mcp/fabricloom/FabricLoomDecompileSourceProvider.kt =================================================================== --- src/main/kotlin/platform/mcp/fabricloom/FabricLoomDecompileSourceProvider.kt (revision 4c112ebe7631dfc1e90ba548ba7b3928ff6f7a72) +++ src/main/kotlin/platform/mcp/fabricloom/FabricLoomDecompileSourceProvider.kt (revision 66bf36f8346d1a2192547bbd1a80515ef5516b48) @@ -166,7 +166,7 @@ for (libraryEntity in libraryEntities.distinctBy { it.name }) { storage.modifyLibraryEntity(libraryEntity) { roots += LibraryRoot( - model.getVirtualFileUrlManager().getOrCreateFromUrl("jar://$sourcePath!/"), + model.getVirtualFileUrlManager().storeAndGet("jar://$sourcePath!/"), LibraryRootTypeId.SOURCES ) } Index: src/main/kotlin/translations/identification/TranslationExternalAnnotationsArtifactsResolver.kt =================================================================== --- src/main/kotlin/translations/identification/TranslationExternalAnnotationsArtifactsResolver.kt (revision 4c112ebe7631dfc1e90ba548ba7b3928ff6f7a72) +++ src/main/kotlin/translations/identification/TranslationExternalAnnotationsArtifactsResolver.kt (revision 66bf36f8346d1a2192547bbd1a80515ef5516b48) @@ -40,7 +40,7 @@ import com.intellij.openapi.vfs.VirtualFile import com.intellij.openapi.vfs.VirtualFileManager import com.intellij.platform.backend.workspace.WorkspaceModel -import com.intellij.platform.backend.workspace.toVirtualFileUrl +import com.intellij.platform.backend.workspace.storeAndGet import com.intellij.platform.workspace.jps.entities.LibraryRoot import com.intellij.platform.workspace.jps.entities.LibraryRootTypeId import com.intellij.platform.workspace.jps.entities.modifyLibraryEntity @@ -84,7 +84,7 @@ val libraryEntity = diff.resolve(library.libraryId) ?: return true val vfUrlManager = WorkspaceModel.getInstance(project).getVirtualFileUrlManager() - val newUrl = annotationsPath.toVirtualFileUrl(vfUrlManager) + val newUrl = vfUrlManager.storeAndGet(annotationsPath) val annotationsRootType = LibraryRootTypeId(AnnotationOrderRootType.ANNOTATIONS_ID) val alreadyExists = libraryEntity.roots.any { it.type == annotationsRootType && it.url == newUrl }