Skip to content

Upgrading org.jetbrains.kotlin:kotlin-android-extensions-runtime 1 to 2

Breaking1.9.25 → 2.2.10Breaking82Platform3Deprecated43New319Changed454Fixed2455Other341

Fetching 45 releases from GitHub…31 / 45
BreakingUpgrade verdict

82 breaking changes and 3 platform requirement changes.

  • The compiler no longer supports targeting Kotlin language versions 1.6 and 1.7.
  • The old switch for choosing the K2 compiler is removed.
  • Drops the IrElementVisitor, IrElementVisitorVoid and IrElementTransformer interfaces.
  • Removes the Ir class.
Top 5 of 128 that need code or config changes
Breaking82
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 the Ir class.
Ir
Removes IrErrorDeclaration from IR.
IrErrorDeclaration
Removes the kotlin.incremental.useClasspathSnapshot property.
kotlin.incremental.useClasspathSnapshot
Removes the deprecated JS/Dce Gradle DSL.
Dce
Removes support for Legacy Metadata Compilation with the 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 when creating a Standalone Analysis API session.
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.
IrAttributeContainer
Drops obsolete parts of the Skia (ad-hoc C++) import in Kotlin/Native.
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 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 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.
Drops DecompiledPsiDeclarationProvider-related APIs.
DecompiledPsiDeclarationProvider
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.
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
Analysis API drops the ability to enable the global phase resolve lock.
Bumps the KLIB ABI version in 2.2.0.
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
Deprecates commonization parameters in KGP with an error.
K2 now prohibits declaring local type aliases.
Forbids using 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
Kotlin/Native makes the @Escapes annotation required for all external functions.
@Escapes
Prohibits exposing types via type parameters' bounds.
Forbids projection modifiers inside a top-level Array in an annotation's value parameter.
Array
KLIB Resolve forbids passing KLIB unique names via CLI.
Fixes a binary incompatible change to KotlinLibraryResolver.resolveWithDependencies.
KotlinLibraryResolver.resolveWithDependencies
Prohibits implementing a var property with an inherited val property.
Cleans up obsolete Gradle plugin variants for Gradle versions below 7.6.
Changes KotlinTargetAlreadyDeclaredChecker severity from warning to error.
KotlinTargetAlreadyDeclaredChecker
Raises 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.
iostvoswatchos
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 in IR.
IrPrivateSymbolBaseIrPublicSymbolBase
Forbids expect class A actual constructor.
Prohibits exposing anonymous types from private inline functions.
Forbids multiple labels per statement in K2.
Prohibits header and impl in MPP.
headerimpl
Marks KaFirReference and all its implementations with the internal modifier.
KaFirReference
Platform3
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.
Deprecated43
Removes -Xextended-compiler-checks in favor of a deprecation cycle.
-Xextended-compiler-checks
Deprecates language versions 1.8 and 1.9.
Deprecates the hasAnnotations flag in kotlin-metadata 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 atomic properties marked with @PublishedApi as an error.
@PublishedApi
Deprecates remaining kotlinOptions DSL features that were not yet deprecated.
kotlinOptions
Updates Kotlin Gradle plugin deprecations ahead of 2.2.
Deprecates phantom-js for Karma in Wasm/JS targets.
phantom-jsKarma
Deprecates publishAllLibraryVariants in kotlin-android.
publishAllLibraryVariants
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
Accessing Task.project during execution is being deprecated in Gradle 8.12.
Task.project
Addresses the 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 the non-Provider API in JS infrastructure extensions.
Deprecates download in NodeJsRootExtension in favor of download from NodeJsExtension, to be removed in 2.2.
NodeJsRootExtensionNodeJsExtensionNodeJsPlugindownload
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.
Deprecates Kotlin/Native APIs marked with FreezingIsDeprecated to error.
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
K2 deprecates using a typealias as a callable qualifier in imports.
typealias
K2 marks all potential implementations of List.getFirst()/getLast() as deprecated independently of JDK.
List.getFirst()List.getLast()
Implements a deprecation warning for KT-57014, the wrong nullability returned from JDK SAM constructor lambdas.
Deprecates SAM constructor usages that require OptIn without an annotation.
OptIn
Deprecates upper bound violations in typealias constructors.