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.
In plain terms
- 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.
Must act Top 5 of 266 that need code or config changes
What you must change
Breaking163
Removes KaEnumEntryInitializerSymbol from the Analysis API.
KaEnumEntryInitializerSymbolRemoves the FE10 implementation.
Prohibits compiling sources in the 'kotlin' package by default on Native.
Drops the ANNOTATION_ON_ANNOTATION_ARGUMENT diagnostic.
ANNOTATION_ON_ANNOTATION_ARGUMENTRemoves old @JvmInline multi-field value classes.
JvmInlineDeletes 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-pathDrops SkipStandaloneScriptsInSourceRoots.
SkipStandaloneScriptsInSourceRootsDrops 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.
IrPluginContextRemoves deprecated API in the 2.4.0 release.
Removes deprecated enableKotlinToolingMetadataArtifact in 2.4.0.
enableKotlinToolingMetadataArtifactRemoves the 'kotlin-android-extensions' plugin id.
kotlin-android-extensionsRemoves 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.createRemoves deprecated ExperimentalDceDsl for K/JS and Wasm.
ExperimentalDceDslRemoves 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.supportMaven removes Kotlin script execution support.
Deprecates and removes D8 from the Wasm js packages.
D8Removes resolution to context receivers in K2.
K2Removes 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.
KaImportOptimizerDrops language version 1.9 for non-JVM platforms.
Drops language version 1.8.
Drops the
IrSerializationSettings.reuseExistingSignaturesForSymbols setting.IrSerializationSettings.reuseExistingSignaturesForSymbolsRemoves
IrDeclaration.parents after the Anvil update.IrDeclaration.parentsDrops BuiltinSymbolsBase from the plugin API.
BuiltinSymbolsBaseRemoves legacy JS backend related CLI flags.
Renames the MustUseReturnValue annotation to MustUseReturnValues.
MustUseReturnValueMustUseReturnValuesDrops JS- and Wasm-specific IrLinkageError classes.
IrLinkageErrorRemoves the default argument for linkageError from kotlin.js.getPropertyCallableRef.
kotlin.js.getPropertyCallableReflinkageErrorRemoves bodies from intrinsified Long methods on Kotlin/JS.
LongRemoves Ant support.
Removes Gradle plugin symbols deprecated after KT-54312.
Removes KotlinCompilation.source.
KotlinCompilation.sourceRemoves support for properties that disable precise task outputs backup.
Removes deprecated classpath snapshot task inputs.
Removes additionalMetadata from the compiler options DSL.
additionalMetadataRemoves the resources resolution strategy completely.
Removes the legacy kotlin-gradle-plugin-model.
kotlin-gradle-plugin-modelRemoves metadata dependencies transformation for the runtimeOnly scope.
runtimeOnlyRemoves the bitcode DSL.
Removes the kapt.use.k2 property and the code allowing K2 with K1 kapt.
kapt.use.k2Removes scoped resolvable and intransitive DependenciesMetadata configurations used in the pre-IdeMultiplatformImport IDE import.
DependenciesMetadataRenames KaPropertyAccessorSymbol#isCustom to isNotDefault.
KaPropertyAccessorSymbol#isCustomKaPropertyAccessorSymbol#isNotDefaultRemoves kotlin-native/Interop/JsRuntime from Kotlin/Native.
kotlin-native/Interop/JsRuntimeRemoves the -Xjps compiler argument.
-XjpsDeletes the kotlin-android-extensions compiler plugin.
kotlin-android-extensionsRemoves the 'kotlin-android-extensions' plugin.
kotlin-android-extensionsRemoves the ability to use the Native non-embeddable compiler jar in the Gradle plugin.
Removes JS-related functionality from kotlin-maven-plugin.
kotlin-maven-pluginDrops language versions 1.6 and 1.7.
Drops the -Xuse-k2 compiler flag.
-Xuse-k2Drops the IrElementVisitor, IrElementVisitorVoid and IrElementTransformer interfaces.
IrElementVisitorIrElementVisitorVoidIrElementTransformerRemoves IrErrorDeclaration from IR.
IrErrorDeclarationRemoves the IntoSingleModule strategy.
IntoSingleModuleRemoves the 'kotlin.incremental.useClasspathSnapshot' property.
kotlin.incremental.useClasspathSnapshotRemoves the deprecated JS/Dce Gradle DSL.
DceRemoves support for Legacy Metadata Compilation with support of Compatibility Metadata Variant.
Removes KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefix and overrideDisambiguationClassifierOnIdeImport from KGP.
KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefixoverrideDisambiguationClassifierOnIdeImportRemoves preset APIs.
Removes legacy KMP flags.
Removes the 'android()' target.
android()Removes PomDependenciesRewriter, which is not compatible with Project Isolation.
PomDependenciesRewriterRemoves konanVersion from CInteropProcess.
CInteropProcesskonanVersionRemoves 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.
modDrops IrAttributeContainer from the IR API.
IrAttributeContainerDrops obsolete parts of the Skia (ad-hoc C++) import in Kotlin/Native.
SkiaRemoves the deprecated KotlinPlatformJsPlugin.
KotlinPlatformJsPluginRemoves the deprecated KotlinPlatformAndroidPlugin.
KotlinPlatformAndroidPluginRemoves the kotlin.androidExtensionsPlugin.enabled flag.
kotlin.androidExtensionsPlugin.enabledRemoves 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###ArrayDrops 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.K2JSCompilerRenames org.jetbrains.kotlin.cli.js.K2JsIrCompiler to K2JSCompiler.
org.jetbrains.kotlin.cli.js.K2JsIrCompilerK2JSCompilerRemoves kotlin-compiler-embeddable from Gradle build runtime dependencies.
kotlin-compiler-embeddableRemoves the deprecated common platform plugin id.
Removes obsolete Gradle plugin variants for Gradle versions below 7.6.
Removes useLibraries from the CocoaPods plugin.
useLibrariesRemoves ChromeWasmGc from Kotlin/Wasm.
ChromeWasmGcRenames the 'high-level-api' family of JARs to 'analysis-api'.
Renames KaClassLikeSymbol.classIdIfNonLocal to classId.
KaClassLikeSymbol.classIdIfNonLocalKaClassLikeSymbol.classIdRenames KtCallableSymbol.callableIdIfNonLocal to callableId.
KtCallableSymbol.callableIdIfNonLocalKtCallableSymbol.callableIdRemoves
infix modifiers from Analysis API type equality and subtyping functions.Removes support for bitcode embedding on Kotlin/Native.
K2 drops support for UseBuilderInferenceOnlyIfNeeded=false.
UseBuilderInferenceOnlyIfNeededDisallows open @Composable functions with default params to fix binary compatibility issues.
@ComposableDeletes the IrMessageLogger interface.
IrMessageLoggerDrops library versions from KLIB manifests during KLIB resolve.
Drops the "-repository <path>" CLI parameter from the KLIB tool.
-repositoryDrops the "install" and "remove" commands from the KLIB tool.
installremoveRemoves the deprecated KotlinToolRunner(project) constructor.
KotlinToolRunnerChanges the semantics of the
-Xpartial-linkage-loglevel compiler option.-Xpartial-linkage-loglevelRemoves kotlin.test.assert*NoInline hidden functions.
kotlin.test.assert*NoInlineBumps 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.ktRaises deprecation to error for the LanguageSettings.enableLanguageFeature DSL.
LanguageSettings.enableLanguageFeatureRemoves deprecated internal JS functions for K/JS and Wasm.
Forbids using KaSessionComponent implementation types directly.
KaSessionComponentChanges 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*OptionsPromotes 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.createPromotes the kotlinArtifacts deprecation to an error.
kotlinArtifactsRestricts delegation of JavaModuleResolver to CliJavaModuleResolver.
JavaModuleResolverCliJavaModuleResolverRemoves kotlin.wasm.internal.ClosureBox* classes from the Kotlin/Wasm standard library.
kotlin.wasm.internal.ClosureBoxRemoves the kotlin.native.internal.Ref class from the Kotlin/Native standard library.
kotlin.native.internal.RefGets rid of the Ir class.
IrChanges deprecation level to ERROR for kotlinOptions DSL.
kotlinOptionsChanges deprecation level to error for KotlinCompilation.source.
KotlinCompilation.sourceRaises the deprecation of KotlinCompilationOutput#resourcesDirProvider to an error.
KotlinCompilationOutput#resourcesDirProviderK2 now prohibits declaring local type aliases.
Forbids using the inline and value class modifiers together.
inlinevalueMakes the kotlin-android-extensions plugin fail the build on apply.
kotlin-android-extensionsDecommissions Gradle properties that disable precise task outputs backup.
Makes using the -Xuse-k2 compiler flag an error.
-Xuse-k2Makes the @Escapes annotation required for all external functions in Kotlin/Native.
@EscapesProhibits exposing types via type parameters' bounds.
Forbids projection modifiers inside a top-level Array in an annotation value parameter.
ArrayKLIB Resolve forbids passing KLIB unique names via CLI.
Fixes a binary incompatible evolution of KotlinLibraryResolver.resolveWithDependencies.
KotlinLibraryResolver.resolveWithDependenciesProhibits implementing a var property with an inherited val property.
Changes KotlinTargetAlreadyDeclaredChecker severity from warning to error.
KotlinTargetAlreadyDeclaredCheckerSets deprecation level to Error for KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefix and overrideDisambiguationClassifierOnIdeImport.
KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefixoverrideDisambiguationClassifierOnIdeImportDeprecates the targetFromPreset API with an error.
targetFromPresetDeprecates ios, tvos and watchos presets with an error.
Moves ExperimentalSwiftExportDsl to another package.
ExperimentalSwiftExportDslMoves KaSymbolBasedReference to the resolution package.
KaSymbolBasedReferenceMoves KaTypeProjection to the types package.
KaTypeProjectionMerges the IrPrivateSymbolBase and IrPublicSymbolBase hierarchies.
IrPrivateSymbolBaseIrPublicSymbolBaseMakes ExtrasProperty.kt internal.
ExtrasProperty.ktMarks KaFirReference and all its implementations with the internal modifier.
KaFirReferenceSecurity1
Applies the fix for CVE-2024-7254 to the compiler's fork of protobuf 2.6.1.
protobufPlatform6
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.
Deprecations to plan for
Deprecated96
Deprecates utilities exposed through analysis-internal-utils.
analysis-internal-utilsDeprecates and prohibits using wasmExports in Kotlin/Wasm.
wasmExportsAdds @K1Deprecation to all public declarations of K1 modules.
K1DeprecationDeprecates the K1 compiler.
Removes deprecated '-no-endorsed-libs' usages in the Kotlin project.
-no-endorsed-libsDeprecates using PSI mode from compiler CLI.
Adds ERROR-level deprecation for CleanableStore and CleanDataTask.
CleanableStoreCleanDataTaskDeprecates the KGP contentEquals() utility and moves it to an internal utility function.
contentEquals()Marks parts of the JS Test DSL with DelicateAPI.
DelicateAPIDeprecates the FIR based incremental runner.
FIRDeprecates KtSelfType.
KtSelfTypeDeprecates language version 2.1.
Deprecates kotlin.io.readLine with WARNING.
kotlin.io.readLineDeprecates AbstractCoroutineContextKey and associated API.
AbstractCoroutineContextKeyDeprecates JvmCompilerArguments.contains with a warning in BTA.
JvmCompilerArguments.containsDeprecates 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.
enableKotlinToolingMetadataArtifactAdds Deprecated annotation to the legacyDump block and property in ABI Validation.
legacyDumpDeprecates KotlinJsCompilerType and KotlinProjectExtension methods using it.
KotlinJsCompilerTypeKotlinProjectExtensionDeprecates KaSymbolInformationProvider getterDeprecationStatus and setterDeprecationStatus.
KaSymbolInformationProvidergetterDeprecationStatussetterDeprecationStatusDeprecates KaFunctionType.arity in the Analysis API.
KaFunctionType.arityDeprecates the @BuilderInference annotation.
BuilderInferenceDeprecates isMemoryLeakCheckerActive in Kotlin/Native.
isMemoryLeakCheckerActiveDeprecates forceCheckedShutdown in Kotlin/Native.
forceCheckedShutdownDeprecates PreprocessedVirtualFileFactoryExtension.
PreprocessedVirtualFileFactoryExtensionDeprecates the out-of-process compilation mode.
Deprecates the LanguageSettings.enableLanguageFeature DSL.
LanguageSettings.enableLanguageFeatureDeprecates the CleanableStore infrastructure.
CleanableStoreDeprecates 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-detectConsiders deprecating and removing the kotlin.kmp.isolated-projects.support property.
kotlin.kmp.isolated-projects.supportDeprecates kotlin.native.cacheKind and introduces a DSL instead.
kotlin.native.cacheKindMigrates from validityAsserted to withValidityAssertion.
validityAssertedwithValidityAssertionDeprecates eager GlobalData initialization in Kotlin/Native.
GlobalDataDeprecates Number.toChar() with error deprecation level.
Number.toChar()Raises kotlin.io.createTempDir and createTempFile deprecation level to ERROR.
kotlin.io.createTempDirkotlin.io.createTempFileDeprecates 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=stdDeprecates the old Build Tools API prototype API.
Deprecates -Xjvm-default in favor of -jvm-default.
-Xjvm-default-jvm-defaultDeprecates ComponentRegistrar.
ComponentRegistrarDeprecates usage of HasKotlinDependencies inside KotlinCompilation.
HasKotlinDependenciesKotlinCompilationUpdates the deprecation of KotlinJsTestFramework#createTestExecutionSpec.
KotlinJsTestFramework#createTestExecutionSpecDeprecates the org.jetbrains.kotlin.android plugin.
org.jetbrains.kotlin.androidPromotes 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-jsPromotes deprecation of ExperimentalWasmDsl to Error for K/JS and Wasm.
ExperimentalWasmDslPromotes deprecation of internal JS functions to Error for K/JS and Wasm.
Promotes deprecation of ExperimentalDceDsl to Error for K/JS and Wasm.
ExperimentalDceDslDeprecates 'androidTarget'.
androidTargetK2 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.k2Removes -Xextended-compiler-checks in favor of a deprecation cycle.
-Xextended-compiler-checksDeprecates language versions 1.8 and 1.9.
Deprecates kotlin-metadata hasAnnotations flag and adds JVM-only hasAnnotationsInBytecode instead
hasAnnotationshasAnnotationsInBytecodeReviews 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.@PublishedApiDeprecates remaining kotlinOptions DSL features not yet covered by deprecation.
kotlinOptionsUpdates Kotlin Gradle plugin deprecations ahead of version 2.2.
Deprecates phantom-js for Karma in Wasm/JS.
phantom-jsKarmaDeprecates publishAllLibraryVariants in kotlin-android.
publishAllLibraryVariantskotlin-androidDeprecates commonization parameters in KGP with an error.
KGPIncreases DeprecationLevel to 'Error' on deprecated 'ExtrasProperty.kt' in Kotlin 2.2.
ExtrasProperty.ktDeprecates kotlinArtifacts with a warning.
kotlinArtifactsContinues deprecation of the REPL built into kotlinc.
kotlincDeprecates accessing Task.project during execution in Gradle 8.12.
Task.projectNotes upcoming deprecation of Boolean 'is-' properties in Gradle Groovy scripts.
Deprecates the JvmDefault annotation with level HIDDEN.
JvmDefaultWarns users about the removal of context classes and constructors.
Implements a deprecation error for FIELD-targeted annotations on annotation properties.
FIELDProhibits via a deprecation warning accessing a nested class through a generic outer class.
KMM Wizards stop using the deprecated 'kotlinOptions'.
kotlinOptionsHandles 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.
NodeJsRootExtensiondownloadNodeJsExtensionNodeJsPluginDeprecates 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.
SynchronizedThrowsJvmFieldAdds a deprecation warning for the reified modifier on type parameters of a type alias.
reifiedDeprecates 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.
FreezingIsDeprecatedDeprecates KotlinCompilationOutput#resourcesDirProvider.
KotlinCompilationOutput#resourcesDirProviderChanges 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