Skip to content

Upgrading org.jetbrains.kotlin:kotlin-stdlib-jdk8 1 to 2

Breaking1.9.25 → 2.4.21Breaking163Security1Platform6Deprecated96New701Changed859Fixed3718Other623

Fetching 87 releases from GitHub…77 / 87
BreakingUpgrade verdict

163 breaking changes and 6 platform requirement changes and a security fix.

  • The enum entry initializer symbol is gone, so code referencing it must be updated.
  • The old frontend implementation is removed from the codebase.
  • Prohibits compiling sources in the 'kotlin' package by default on Native.
  • Drops the ANNOTATION_ON_ANNOTATION_ARGUMENT diagnostic.
Top 5 of 266 that need code or config changes
Breaking163
Removes KaEnumEntryInitializerSymbol from the Analysis API.
KaEnumEntryInitializerSymbol
Removes the FE10 implementation.
Prohibits compiling sources in the 'kotlin' package by default on Native.
Drops the ANNOTATION_ON_ANNOTATION_ARGUMENT diagnostic.
ANNOTATION_ON_ANNOTATION_ARGUMENT
Removes old @JvmInline multi-field value classes.
JvmInline
Deletes the source code for the legacy JS backend.
Drops support for legacy JS metadata from the metadata decompiler.
Drops JVM classpath metadata arguments in BTA.
Removes the Xklib-normalize-absolute-path compiler argument.
Xklib-normalize-absolute-path
Drops SkipStandaloneScriptsInSourceRoots.
SkipStandaloneScriptsInSourceRoots
Drops language version 1.9 for JVM.
Removes Kotlin/Native support for non-opaque LLVM pointer types.
Drops the old IR parameter API.
Removes deprecated non-builder factory functions and classes in BTA.
Drops deprecated K1 specific methods from IrPluginContext.
IrPluginContext
Removes deprecated API in the 2.4.0 release.
Removes deprecated enableKotlinToolingMetadataArtifact in 2.4.0.
enableKotlinToolingMetadataArtifact
Removes the 'kotlin-android-extensions' plugin id.
kotlin-android-extensions
Removes out-of-process compilation mode.
Removes getPluginArtifactForNative() from the Gradle plugin.
getPluginArtifactForNative()
Removes the word 'legacy' from the ABI Validation DSL.
Removes deprecated public constructors of JS declarations for K/JS and Wasm.
Removes deprecated NodeJsExec.create for K/JS and Wasm.
NodeJsExec.create
Removes deprecated ExperimentalDceDsl for K/JS and Wasm.
ExperimentalDceDsl
Removes deprecated Kotlin/JS task constructors in Gradle.
Removes deprecated symbols related to the legacy JS target in Gradle.
Removes deprecated wasm declarations in the js package for K/JS and Wasm.
Removes Android source set layout v1.
Removes deprecated Gradle property kotlin.kmp.isolated-projects.support.
kotlin.kmp.isolated-projects.support
Maven removes Kotlin script execution support.
Deprecates and removes D8 from the Wasm js packages.
D8
Removes resolution to context receivers in K2.
K2
Removes reflection support for multi-field value classes.
Deletes the DSL for working with dump variants in ABI Validation.
Drops the K1 decompiler.
Drops KaImportOptimizer from the Analysis API.
KaImportOptimizer
Drops language version 1.9 for non-JVM platforms.
Drops language version 1.8.
Drops the IrSerializationSettings.reuseExistingSignaturesForSymbols setting.
IrSerializationSettings.reuseExistingSignaturesForSymbols
Removes IrDeclaration.parents after the Anvil update.
IrDeclaration.parents
Drops BuiltinSymbolsBase from the plugin API.
BuiltinSymbolsBase
Removes legacy JS backend related CLI flags.
Renames the MustUseReturnValue annotation to MustUseReturnValues.
MustUseReturnValueMustUseReturnValues
Drops JS- and Wasm-specific IrLinkageError classes.
IrLinkageError
Removes the default argument for linkageError from kotlin.js.getPropertyCallableRef.
kotlin.js.getPropertyCallableReflinkageError
Removes bodies from intrinsified Long methods on Kotlin/JS.
Long
Removes Ant support.
Removes Gradle plugin symbols deprecated after KT-54312.
Removes KotlinCompilation.source.
KotlinCompilation.source
Removes support for properties that disable precise task outputs backup.
Removes deprecated classpath snapshot task inputs.
Removes additionalMetadata from the compiler options DSL.
additionalMetadata
Removes the resources resolution strategy completely.
Removes the legacy kotlin-gradle-plugin-model.
kotlin-gradle-plugin-model
Removes metadata dependencies transformation for the runtimeOnly scope.
runtimeOnly
Removes the bitcode DSL.
Removes the kapt.use.k2 property and the code allowing K2 with K1 kapt.
kapt.use.k2
Removes scoped resolvable and intransitive DependenciesMetadata configurations used in the pre-IdeMultiplatformImport IDE import.
DependenciesMetadata
Renames KaPropertyAccessorSymbol#isCustom to isNotDefault.
KaPropertyAccessorSymbol#isCustomKaPropertyAccessorSymbol#isNotDefault
Removes kotlin-native/Interop/JsRuntime from Kotlin/Native.
kotlin-native/Interop/JsRuntime
Removes the -Xjps compiler argument.
-Xjps
Deletes the kotlin-android-extensions compiler plugin.
kotlin-android-extensions
Removes the 'kotlin-android-extensions' plugin.
kotlin-android-extensions
Removes the ability to use the Native non-embeddable compiler jar in the Gradle plugin.
Removes JS-related functionality from kotlin-maven-plugin.
kotlin-maven-plugin
Drops language versions 1.6 and 1.7.
Drops the -Xuse-k2 compiler flag.
-Xuse-k2
Drops the IrElementVisitor, IrElementVisitorVoid and IrElementTransformer interfaces.
IrElementVisitorIrElementVisitorVoidIrElementTransformer
Removes IrErrorDeclaration from IR.
IrErrorDeclaration
Removes the IntoSingleModule strategy.
IntoSingleModule
Removes the 'kotlin.incremental.useClasspathSnapshot' property.
kotlin.incremental.useClasspathSnapshot
Removes the deprecated JS/Dce Gradle DSL.
Dce
Removes support for Legacy Metadata Compilation with support of Compatibility Metadata Variant.
Removes KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefix and overrideDisambiguationClassifierOnIdeImport from KGP.
KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefixoverrideDisambiguationClassifierOnIdeImport
Removes preset APIs.
Removes legacy KMP flags.
Removes the 'android()' target.
android()
Removes PomDependenciesRewriter, which is not compatible with Project Isolation.
PomDependenciesRewriter
Removes konanVersion from CInteropProcess.
CInteropProcesskonanVersion
Removes the Kotlin Native Performance plugin.
Removes multiplatform support from the Maven plugin.
Removes the custom class loader option in Analysis API Standalone session creation.
Removes JAR publications with old artifact names in the high-level-api family.
Removes the deprecated Analysis API API.
Removes the deprecated mod operator convention.
mod
Drops IrAttributeContainer from the IR API.
IrAttributeContainer
Drops obsolete parts of the Skia (ad-hoc C++) import in Kotlin/Native.
Skia
Removes the deprecated KotlinPlatformJsPlugin.
KotlinPlatformJsPlugin
Removes the deprecated KotlinPlatformAndroidPlugin.
KotlinPlatformAndroidPlugin
Removes the kotlin.androidExtensionsPlugin.enabled flag.
kotlin.androidExtensionsPlugin.enabled
Removes the Legacy Multiplatform Gradle Plugin.
Removes the built-in ABI snapshot implementation.
Removes default exports from Wasm exports in Kotlin/Wasm.
Removes the create###Array functions from the WASM stdlib.
create###Array
Drops language versions 1.4 and 1.5.
Removes JDK 21 getFirst()/getLast() from (Mutable)List interfaces in K1.
List.getFirst()List.getLast()MutableList.getFirst()MutableList.getLast()
Removes decoy support for the JS target from the Compose compiler.
Removes the ability to apply compiler plugins during the KAPT stub generation phase.
Deletes the org.jetbrains.kotlin.cli.js.K2JSCompiler class.
org.jetbrains.kotlin.cli.js.K2JSCompiler
Renames org.jetbrains.kotlin.cli.js.K2JsIrCompiler to K2JSCompiler.
org.jetbrains.kotlin.cli.js.K2JsIrCompilerK2JSCompiler
Removes kotlin-compiler-embeddable from Gradle build runtime dependencies.
kotlin-compiler-embeddable
Removes the deprecated common platform plugin id.
Removes obsolete Gradle plugin variants for Gradle versions below 7.6.
Removes useLibraries from the CocoaPods plugin.
useLibraries
Removes ChromeWasmGc from Kotlin/Wasm.
ChromeWasmGc
Renames the 'high-level-api' family of JARs to 'analysis-api'.
Renames KaClassLikeSymbol.classIdIfNonLocal to classId.
KaClassLikeSymbol.classIdIfNonLocalKaClassLikeSymbol.classId
Renames KtCallableSymbol.callableIdIfNonLocal to callableId.
KtCallableSymbol.callableIdIfNonLocalKtCallableSymbol.callableId
Removes infix modifiers from Analysis API type equality and subtyping functions.
Removes support for bitcode embedding on Kotlin/Native.
K2 drops support for UseBuilderInferenceOnlyIfNeeded=false.
UseBuilderInferenceOnlyIfNeeded
Disallows open @Composable functions with default params to fix binary compatibility issues.
@Composable
Deletes the IrMessageLogger interface.
IrMessageLogger
Drops library versions from KLIB manifests during KLIB resolve.
Drops the "-repository <path>" CLI parameter from the KLIB tool.
-repository
Drops the "install" and "remove" commands from the KLIB tool.
installremove
Removes the deprecated KotlinToolRunner(project) constructor.
KotlinToolRunner
Changes the semantics of the -Xpartial-linkage-loglevel compiler option.
-Xpartial-linkage-loglevel
Removes kotlin.test.assert*NoInline hidden functions.
kotlin.test.assert*NoInline
Bumps the minimum deployment version of Apple targets.
Promotes the deprecation level for the BTA prototype to ERROR.
Removes internal and deprecated API from ExtrasProperty.kt.
ExtrasProperty.kt
Raises deprecation to error for the LanguageSettings.enableLanguageFeature DSL.
LanguageSettings.enableLanguageFeature
Removes deprecated internal JS functions for K/JS and Wasm.
Forbids using KaSessionComponent implementation types directly.
KaSessionComponent
Changes K1 API deprecation level from Warning to Error.
Prohibits using nested type aliases from libraries in sources with language version below 2.3.
Forbids compiling code with explicit _root_ide_package_ in CLI mode.
_root_ide_package_
Forbids typealiasing for all compiler-required annotations.
Prohibits protected visibility in final expected classes.
Raises the deprecation level to error for Kotlin*Options properties.
Kotlin*Options
Promotes deprecation of public constructors of JS declarations to Error in K/JS and Wasm.
Promotes deprecation of wasm declarations in the "js" package to Error.
Promotes deprecation of NodeJsExec.create to Error.
NodeJsExec.create
Promotes the kotlinArtifacts deprecation to an error.
kotlinArtifacts
Restricts delegation of JavaModuleResolver to CliJavaModuleResolver.
JavaModuleResolverCliJavaModuleResolver
Removes kotlin.wasm.internal.ClosureBox* classes from the Kotlin/Wasm standard library.
kotlin.wasm.internal.ClosureBox
Removes the kotlin.native.internal.Ref class from the Kotlin/Native standard library.
kotlin.native.internal.Ref
Gets rid of the Ir class.
Ir
Changes deprecation level to ERROR for kotlinOptions DSL.
kotlinOptions
Changes deprecation level to error for KotlinCompilation.source.
KotlinCompilation.source
Raises the deprecation of KotlinCompilationOutput#resourcesDirProvider to an error.
KotlinCompilationOutput#resourcesDirProvider
K2 now prohibits declaring local type aliases.
Forbids using the inline and value class modifiers together.
inlinevalue
Makes the kotlin-android-extensions plugin fail the build on apply.
kotlin-android-extensions
Decommissions Gradle properties that disable precise task outputs backup.
Makes using the -Xuse-k2 compiler flag an error.
-Xuse-k2
Makes the @Escapes annotation required for all external functions in Kotlin/Native.
@Escapes
Prohibits exposing types via type parameters' bounds.
Forbids projection modifiers inside a top-level Array in an annotation value parameter.
Array
KLIB Resolve forbids passing KLIB unique names via CLI.
Fixes a binary incompatible evolution of KotlinLibraryResolver.resolveWithDependencies.
KotlinLibraryResolver.resolveWithDependencies
Prohibits implementing a var property with an inherited val property.
Changes KotlinTargetAlreadyDeclaredChecker severity from warning to error.
KotlinTargetAlreadyDeclaredChecker
Sets deprecation level to Error for KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefix and overrideDisambiguationClassifierOnIdeImport.
KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefixoverrideDisambiguationClassifierOnIdeImport
Deprecates the targetFromPreset API with an error.
targetFromPreset
Deprecates ios, tvos and watchos presets with an error.
Moves ExperimentalSwiftExportDsl to another package.
ExperimentalSwiftExportDsl
Moves KaSymbolBasedReference to the resolution package.
KaSymbolBasedReference
Moves KaTypeProjection to the types package.
KaTypeProjection
Merges the IrPrivateSymbolBase and IrPublicSymbolBase hierarchies.
IrPrivateSymbolBaseIrPublicSymbolBase
Makes ExtrasProperty.kt internal.
ExtrasProperty.kt
Marks KaFirReference and all its implementations with the internal modifier.
KaFirReference
Security1
Applies the fix for CVE-2024-7254 to the compiler's fork of protobuf 2.6.1.
protobuf
Platform6
Bumps the minimal supported AGP version to 8.5.2.
Bumps the minimal supported iOS and tvOS versions to 14.0.
Bumps the minimal supported AGP version to 8.2.2.
Bumps the minimal supported Gradle version to 7.6.3.
Bumps the minimal supported Android Gradle plugin version to 7.3.1.
Adds Xcode 16 support in Kotlin.
Deprecated96
Deprecates utilities exposed through analysis-internal-utils.
analysis-internal-utils
Deprecates and prohibits using wasmExports in Kotlin/Wasm.
wasmExports
Adds @K1Deprecation to all public declarations of K1 modules.
K1Deprecation
Deprecates the K1 compiler.
Removes deprecated '-no-endorsed-libs' usages in the Kotlin project.
-no-endorsed-libs
Deprecates using PSI mode from compiler CLI.
Adds ERROR-level deprecation for CleanableStore and CleanDataTask.
CleanableStoreCleanDataTask
Deprecates the KGP contentEquals() utility and moves it to an internal utility function.
contentEquals()
Marks parts of the JS Test DSL with DelicateAPI.
DelicateAPI
Deprecates the FIR based incremental runner.
FIR
Deprecates KtSelfType.
KtSelfType
Deprecates language version 2.1.
Deprecates kotlin.io.readLine with WARNING.
kotlin.io.readLine
Deprecates AbstractCoroutineContextKey and associated API.
AbstractCoroutineContextKey
Deprecates JvmCompilerArguments.contains with a warning in BTA.
JvmCompilerArguments.contains
Deprecates access to Kotlin source sets in the Android extension.
Deprecates the non-BTA JVM compiler execution mode in Gradle.
Deprecates support for Gradle 7.6 through 8.13 versions.
Makes enableKotlinToolingMetadataArtifact deprecated.
enableKotlinToolingMetadataArtifact
Adds Deprecated annotation to the legacyDump block and property in ABI Validation.
legacyDump
Deprecates KotlinJsCompilerType and KotlinProjectExtension methods using it.
KotlinJsCompilerTypeKotlinProjectExtension
Deprecates KaSymbolInformationProvider getterDeprecationStatus and setterDeprecationStatus.
KaSymbolInformationProvidergetterDeprecationStatussetterDeprecationStatus
Deprecates KaFunctionType.arity in the Analysis API.
KaFunctionType.arity
Deprecates the @BuilderInference annotation.
BuilderInference
Deprecates isMemoryLeakCheckerActive in Kotlin/Native.
isMemoryLeakCheckerActive
Deprecates forceCheckedShutdown in Kotlin/Native.
forceCheckedShutdown
Deprecates PreprocessedVirtualFileFactoryExtension.
PreprocessedVirtualFileFactoryExtension
Deprecates the out-of-process compilation mode.
Deprecates the LanguageSettings.enableLanguageFeature DSL.
LanguageSettings.enableLanguageFeature
Deprecates the CleanableStore infrastructure.
CleanableStore
Deprecates declaring dependencies using multi-string notation.
Deprecates specifying 'org.gradle.java.installations.auto-detect' as a project property on the command line.
org.gradle.java.installations.auto-detect
Considers deprecating and removing the kotlin.kmp.isolated-projects.support property.
kotlin.kmp.isolated-projects.support
Deprecates kotlin.native.cacheKind and introduces a DSL instead.
kotlin.native.cacheKind
Migrates from validityAsserted to withValidityAssertion.
validityAssertedwithValidityAssertion
Deprecates eager GlobalData initialization in Kotlin/Native.
GlobalData
Deprecates Number.toChar() with error deprecation level.
Number.toChar()
Raises kotlin.io.createTempDir and createTempFile deprecation level to ERROR.
kotlin.io.createTempDirkotlin.io.createTempFile
Deprecates String.subSequence(start, end) with error and plans to drop it in the future.
String.subSequence(start, end)
Raises InputStream.readBytes(Int) deprecation level to HIDDEN.
InputStream.readBytes(Int)
Deprecates the -Xallocator=std compiler option for Kotlin/Native.
-Xallocator=std
Deprecates the old Build Tools API prototype API.
Deprecates -Xjvm-default in favor of -jvm-default.
-Xjvm-default-jvm-default
Deprecates ComponentRegistrar.
ComponentRegistrar
Deprecates usage of HasKotlinDependencies inside KotlinCompilation.
HasKotlinDependenciesKotlinCompilation
Updates the deprecation of KotlinJsTestFramework#createTestExecutionSpec.
KotlinJsTestFramework#createTestExecutionSpec
Deprecates the org.jetbrains.kotlin.android plugin.
org.jetbrains.kotlin.android
Promotes deprecation of NPM and Yarn package manager internal functions for K/JS and Wasm.
Promotes the phantom-js for Karma deprecation to ERROR for Wasm/JS.
phantom-js
Promotes deprecation of ExperimentalWasmDsl to Error for K/JS and Wasm.
ExperimentalWasmDsl
Promotes deprecation of internal JS functions to Error for K/JS and Wasm.
Promotes deprecation of ExperimentalDceDsl to Error for K/JS and Wasm.
ExperimentalDceDsl
Deprecates 'androidTarget'.
androidTarget
K2 deprecates exposing a package-private parameter of an internal method.
Finds and deprecates actively used parts of the K1 API.
Deprecates referencing inlineable lambdas in js() calls.
js()
Deprecates the kapt.use.k2 property.
kapt.use.k2
Removes -Xextended-compiler-checks in favor of a deprecation cycle.
-Xextended-compiler-checks
Deprecates language versions 1.8 and 1.9.
Deprecates kotlin-metadata hasAnnotations flag and adds JVM-only hasAnnotationsInBytecode instead
hasAnnotationshasAnnotationsInBytecode
Reviews deprecations in stdlib for 2.2
Deprecates Windows 7 support in Kotlin/Native.
Deprecates Ant support.
Deprecates declaration of atomic properties marked with @PublishedApi with an error.
@PublishedApi
Deprecates remaining kotlinOptions DSL features not yet covered by deprecation.
kotlinOptions
Updates Kotlin Gradle plugin deprecations ahead of version 2.2.
Deprecates phantom-js for Karma in Wasm/JS.
phantom-jsKarma
Deprecates publishAllLibraryVariants in kotlin-android.
publishAllLibraryVariantskotlin-android
Deprecates commonization parameters in KGP with an error.
KGP
Increases DeprecationLevel to 'Error' on deprecated 'ExtrasProperty.kt' in Kotlin 2.2.
ExtrasProperty.kt
Deprecates kotlinArtifacts with a warning.
kotlinArtifacts
Continues deprecation of the REPL built into kotlinc.
kotlinc
Deprecates accessing Task.project during execution in Gradle 8.12.
Task.project
Notes upcoming deprecation of Boolean 'is-' properties in Gradle Groovy scripts.
Deprecates the JvmDefault annotation with level HIDDEN.
JvmDefault
Warns users about the removal of context classes and constructors.
Implements a deprecation error for FIELD-targeted annotations on annotation properties.
FIELD
Prohibits via a deprecation warning accessing a nested class through a generic outer class.
KMM Wizards stop using the deprecated 'kotlinOptions'.
kotlinOptions
Handles ProjectDependency.getDependencyProject() being deprecated in Gradle 8.11.
ProjectDependency.getDependencyProject()
Deprecates non-Provider API in JS infrastructure extensions.
Deprecates download in NodeJsRootExtension, directing users to NodeJsExtension instead; removal planned for 2.2.
NodeJsRootExtensiondownloadNodeJsExtensionNodeJsPlugin
Deprecates and removes support for bitcode embedding from the Kotlin Gradle plugin.
Deprecates instantiating reified type parameters into intersection types.
Implements a general deprecation of types with inaccessible type arguments.
Implements a deprecation error for Synchronized, Throws and JvmField on annotation parameters in K2.
SynchronizedThrowsJvmField
Adds a deprecation warning for the reified modifier on type parameters of a type alias.
reified
Deprecates passing KLIB unique names via CLI in KLIB Resolve.
Reviews deprecations in stdlib for 2.1.
Kotlin/Native deprecates APIs marked with FreezingIsDeprecated to error level.
FreezingIsDeprecated
Deprecates KotlinCompilationOutput#resourcesDirProvider.
KotlinCompilationOutput#resourcesDirProvider
Changes the deprecation message for KMP target shortcuts.
Implements deprecation of smartcasts on class-delegated properties.
Deprecates error tolerance in JS.
Deprecates JVM history files based incremental compilation.
Deprecates combinations of the KMP plugin with some Gradle Java plugins.
KMP