Status Update
Comments
mg...@google.com <mg...@google.com>
mg...@google.com <mg...@google.com> #2
Annotation
@RestrictTo(value = [Scope.LIBRARY_GROUP] type=kotlin.Array<out androidx.annotation.RestrictTo.Scope> varargElementType=androidx.annotation.RestrictTo.Scope)
is missing on actual declaration.
Since the actual
declaration is a typealias
, we can't resolve the warnings in lifecycle.common
until
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Fix KotlinTarget 2 in savedstate
Expand for full commit details
Fix KotlinTarget 2 in `savedstate`
Bug: 397736115
Test: N/A
Change-Id: I475a442180fa274e4ad36955757d1c4c66867e8d
Files:
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/internal/SynchronizedObject.kt
Hash: 5a0d860a6eb7e445ad93b865f353044e8babb79b
Date: Thu Feb 27 16:20:30 2025
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Fix KotlinTarget 2 in lifecycle.runtime
Expand for full commit details
Fix KotlinTarget 2 in `lifecycle.runtime`
Bug: 397736115
Test: N/A
Change-Id: I181b6b50b07c7d617e1afa202961e0ea6e033566
Files:
- M
lifecycle/lifecycle-runtime/src/androidMain/kotlin/androidx/lifecycle/ReportFragment.android.kt
Hash: 15b24bb3eff6b157a8e615a97b9e968840f0cde0
Date: Thu Feb 27 16:12:31 2025
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Fix KotlinTarget 2 in lifecycle.viewmodel
Expand for full commit details
Fix KotlinTarget 2 in `lifecycle.viewmodel`
RelNote: "Add `@MainThread` annotation to `ViewModelProvider.get` in all supported KMP platforms."
Bug: 397736115
Test: N/A
Change-Id: I7e8ddcd37a714fe511719aea74650f48acb85847
Files:
- M
lifecycle/lifecycle-viewmodel/api/current.txt
- M
lifecycle/lifecycle-viewmodel/api/restricted_current.txt
- M
lifecycle/lifecycle-viewmodel/src/androidMain/kotlin/androidx/lifecycle/ViewModelProvider.android.kt
- M
lifecycle/lifecycle-viewmodel/src/commonMain/kotlin/androidx/lifecycle/viewmodel/internal/SynchronizedObject.kt
Hash: e9f4c91901111325c8371006a393a6b2a4f0a23f
Date: Thu Feb 27 16:19:06 2025
au...@google.com <au...@google.com> #6
Can you explain further what the issue is in #2?
mg...@google.com <mg...@google.com> #7
We have an RestrictTo
in common
.
There's an RestrictTo
in nonJvm
.
However, in android
, we have an
Annotation
RestrictTo(...)
is missing on actual declaration.
The issue is that RestrictTo
needs to be in the common source (since the type is restricted), but RestrictTo
currently cannot target typealias
(see AnnotationTarget.TYPEALIAS
to
That said, I'm not sure what RestrictTo
would mean when applied to a typealias
, since the aliased type itself may not be restricted.
As far as I know, this warning cannot be suppressed with @Suppress("...")
om...@google.com <om...@google.com> #8
Why dont we just switch from a typealias to an actual class implementation that just delegates to the Java one. See
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
Author: Omar Ismail <
Link:
switch from a typealias to an actual class impl that delegates to the Java class
Expand for full commit details
switch from a typealias to an actual class impl that delegates to the Java class
This removes the error we see in b/397736115
BUG: 397736115
TESTED: Ran ./gradlew :lifecycle:lifecycle-common:compileKotlinJvm and no warnings appeared
Change-Id: I6abbf31029af2e92360dbc3ce0da34cccac3bbc5
Files:
- M
lifecycle/integration-tests/kotlintestapp/lint-baseline.xml
- M
lifecycle/lifecycle-common/src/jvmMain/kotlin/androidx/lifecycle/Lifecycle.jvm.kt
Hash: b3d343bfbea66190f4d989690c9832fee9a7cbb0
Date: Thu Mar 06 15:19:13 2025
Description
AndroidX is preparing to move to target Kotlin language version 2.0. In order to make this transition smooth, please help fix these warnings ahead of this switch. You can reproduce it with the following command: