Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 0154910724cdc44253af1d2f8cede76264783226
Author: Aurimas Liutikas <aurimas@google.com>
Date: Thu Jun 27 15:25:02 2024
Expand native target support for annotation and collection libraries
- Enable watchos and tvos download in importMaven
- Add support for watchos and tvos targets in AndroidXMultiplatformExtension
- Enable watchos and tvos in :annotation:annotation
- Enable linuxArm64, watchos, and tvos in :collection:collection
This work is required as we work towards setting up native stubs for
compose projects.
Test: ./gradlew collection:collection:publish
Bug: 349894318
Change-Id: Idfd1faa3a826bb91ee14722f7437bdcf99cf0018
M annotation/annotation/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M collection/collection/build.gradle
M development/build_log_simplifier/messages.ignore
M development/importMaven/src/main/kotlin/androidx/build/importMaven/KmpConfig.kt
https://android-review.googlesource.com/3151736
Branch: androidx-main
commit 0154910724cdc44253af1d2f8cede76264783226
Author: Aurimas Liutikas <aurimas@google.com>
Date: Thu Jun 27 15:25:02 2024
Expand native target support for annotation and collection libraries
- Enable watchos and tvos download in importMaven
- Add support for watchos and tvos targets in AndroidXMultiplatformExtension
- Enable watchos and tvos in :annotation:annotation
- Enable linuxArm64, watchos, and tvos in :collection:collection
This work is required as we work towards setting up native stubs for
compose projects.
Test: ./gradlew collection:collection:publish
Bug: 349894318
Change-Id: Idfd1faa3a826bb91ee14722f7437bdcf99cf0018
M annotation/annotation/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M collection/collection/build.gradle
M development/build_log_simplifier/messages.ignore
M development/importMaven/src/main/kotlin/androidx/build/importMaven/KmpConfig.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 39cd1e9f7579513bde139c17f9c51f9012d56152
Author: Aurimas Liutikas <aurimas@google.com>
Date: Thu Jun 27 15:25:02 2024
Expand native target support for annotation and collection libraries
Relandr.android.com/3151736 now with workaround for https://youtrack.jetbrains.com/issue/KT-62653
- Enable watchos and tvos download in importMaven
- Add support for watchos and tvos targets in AndroidXMultiplatformExtension
- Enable watchos and tvos in :annotation:annotation
- Enable linuxArm64, watchos, and tvos in :collection:collection
This work is required as we work towards setting up native stubs for
compose projects.
Test: ./gradlew collection:collection:publish
Bug: 349894318
Change-Id: Ic795af8486db48b31633799e06665717d08398db
M annotation/annotation/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M collection/collection/build.gradle
M development/build_log_simplifier/messages.ignore
M development/importMaven/src/main/kotlin/androidx/build/importMaven/KmpConfig.kt
https://android-review.googlesource.com/3156121
Branch: androidx-main
commit 39cd1e9f7579513bde139c17f9c51f9012d56152
Author: Aurimas Liutikas <aurimas@google.com>
Date: Thu Jun 27 15:25:02 2024
Expand native target support for annotation and collection libraries
Reland
- Enable watchos and tvos download in importMaven
- Add support for watchos and tvos targets in AndroidXMultiplatformExtension
- Enable watchos and tvos in :annotation:annotation
- Enable linuxArm64, watchos, and tvos in :collection:collection
This work is required as we work towards setting up native stubs for
compose projects.
Test: ./gradlew collection:collection:publish
Bug: 349894318
Change-Id: Ic795af8486db48b31633799e06665717d08398db
M annotation/annotation/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M collection/collection/build.gradle
M development/build_log_simplifier/messages.ignore
M development/importMaven/src/main/kotlin/androidx/build/importMaven/KmpConfig.kt
da...@google.com <da...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit c3a06e79cf427aef1cf0ede1bacb463eb89472be
Author: Aurimas Liutikas <aurimas@google.com>
Date: Thu Jun 27 15:25:02 2024
Expand native target support for annotation and collection libraries
Relandr.android.com/3151736 / r.android.com/3156121 but now with
moving to project(":annotation:annotation") in commonMain as due to
https://youtrack.jetbrains.com/issue/KT-62653 we cannot depend on
project in one source set and prebuilt in the other.
- Enable watchos and tvos download in importMaven
- Add support for watchos and tvos targets in AndroidXMultiplatformExtension
- Enable watchos and tvos in :annotation:annotation
- Enable linuxArm64, watchos, and tvos in :collection:collection
This work is required as we work towards setting up native stubs for
compose projects.
Test: ./gradlew collection:collection:publish
Bug: 349894318
Change-Id: I7f2a1bddbe79ab5e920cdb01ca6a428950a8c2c3
M annotation/annotation/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M busytown/androidx_multiplatform_mac_host_tests_arm64.sh
M camera/integration-tests/avsynctestapp/build.gradle
M collection/collection/build.gradle
M development/build_log_simplifier/messages.ignore
M development/importMaven/src/main/kotlin/androidx/build/importMaven/KmpConfig.kt
M test/uiautomator/integration-tests/testapp/build.gradle
M wear/compose/integration-tests/navigation/build.gradle
https://android-review.googlesource.com/3156423
Branch: androidx-main
commit c3a06e79cf427aef1cf0ede1bacb463eb89472be
Author: Aurimas Liutikas <aurimas@google.com>
Date: Thu Jun 27 15:25:02 2024
Expand native target support for annotation and collection libraries
Reland
moving to project(":annotation:annotation") in commonMain as due to
project in one source set and prebuilt in the other.
- Enable watchos and tvos download in importMaven
- Add support for watchos and tvos targets in AndroidXMultiplatformExtension
- Enable watchos and tvos in :annotation:annotation
- Enable linuxArm64, watchos, and tvos in :collection:collection
This work is required as we work towards setting up native stubs for
compose projects.
Test: ./gradlew collection:collection:publish
Bug: 349894318
Change-Id: I7f2a1bddbe79ab5e920cdb01ca6a428950a8c2c3
M annotation/annotation/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M busytown/androidx_multiplatform_mac_host_tests_arm64.sh
M camera/integration-tests/avsynctestapp/build.gradle
M collection/collection/build.gradle
M development/build_log_simplifier/messages.ignore
M development/importMaven/src/main/kotlin/androidx/build/importMaven/KmpConfig.kt
M test/uiautomator/integration-tests/testapp/build.gradle
M wear/compose/integration-tests/navigation/build.gradle
an...@google.com <an...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit c56a2faf24c82bf961cb10440156745bf3cf30bd
Author: Aurimas Liutikas <aurimas@google.com>
Date: Wed Jul 03 11:10:40 2024
Add linuxX64Stubs for compose runtime libraries
- Add support for linuxX64Stubs
- Add these linuxX64Stubs to compose runtime projects
- Move OperationsTest from commonTest to jvmTest as it has
jvm-reflection usages
Bug: 349894318
Test: ./gradlew -p compose/runtime build
Change-Id: Ia600fafb174b585cf5a0d7a7f3c3726d10b4cc92
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M compose/runtime/runtime-saveable/build.gradle
M compose/runtime/runtime-test-utils/build.gradle
A compose/runtime/runtime-test-utils/src/commonMain/kotlin/androidx/compose/runtime/mock/SynchronizedObject.kt
M compose/runtime/runtime-test-utils/src/commonMain/kotlin/androidx/compose/runtime/mock/TestMonotonicFrameClock.kt
A compose/runtime/runtime-test-utils/src/jvmMain/kotlin/androidx/compose/runtime/mock/SynchronizedObject.jvm.kt
A compose/runtime/runtime-test-utils/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/mock/SynchronizedObject.linuxx64Stubs.kt
M compose/runtime/runtime/build.gradle
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Stack.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/ScopeMap.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotStateSet.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionTestExtensions.kt
M compose/runtime/runtime/src/jvmTest/kotlin/androidx/compose/runtime/changelist/OperationsTest.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/MonotonicFrameClock.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/NotImplemented.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/SynchronizedObject.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/TestOnly.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/Atomic.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/ComposableLambda.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/JvmDefaultWithCompatibility.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/Thread.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/Utils.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/WeakReference.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/snapshots/SnapshotContextElement.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsTest/kotlin/kotlinx/test/IgnoreAndroidUnitTestTarget.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsTest/kotlin/kotlinx/test/IgnoreJsTarget.linuxx64Stubs.kt
https://android-review.googlesource.com/3159861
Branch: androidx-main
commit c56a2faf24c82bf961cb10440156745bf3cf30bd
Author: Aurimas Liutikas <aurimas@google.com>
Date: Wed Jul 03 11:10:40 2024
Add linuxX64Stubs for compose runtime libraries
- Add support for linuxX64Stubs
- Add these linuxX64Stubs to compose runtime projects
- Move OperationsTest from commonTest to jvmTest as it has
jvm-reflection usages
Bug: 349894318
Test: ./gradlew -p compose/runtime build
Change-Id: Ia600fafb174b585cf5a0d7a7f3c3726d10b4cc92
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M compose/runtime/runtime-saveable/build.gradle
M compose/runtime/runtime-test-utils/build.gradle
A compose/runtime/runtime-test-utils/src/commonMain/kotlin/androidx/compose/runtime/mock/SynchronizedObject.kt
M compose/runtime/runtime-test-utils/src/commonMain/kotlin/androidx/compose/runtime/mock/TestMonotonicFrameClock.kt
A compose/runtime/runtime-test-utils/src/jvmMain/kotlin/androidx/compose/runtime/mock/SynchronizedObject.jvm.kt
A compose/runtime/runtime-test-utils/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/mock/SynchronizedObject.linuxx64Stubs.kt
M compose/runtime/runtime/build.gradle
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Stack.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/ScopeMap.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotStateSet.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionTestExtensions.kt
M compose/runtime/runtime/src/jvmTest/kotlin/androidx/compose/runtime/changelist/OperationsTest.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/MonotonicFrameClock.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/NotImplemented.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/SynchronizedObject.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/TestOnly.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/Atomic.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/ComposableLambda.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/JvmDefaultWithCompatibility.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/Thread.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/Utils.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/internal/WeakReference.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsMain/kotlin/androidx/compose/runtime/snapshots/SnapshotContextElement.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsTest/kotlin/kotlinx/test/IgnoreAndroidUnitTestTarget.linuxx64Stubs.kt
A compose/runtime/runtime/src/linuxx64StubsTest/kotlin/kotlinx/test/IgnoreJsTarget.linuxx64Stubs.kt
Description
Version used: 2.2.0
Devices/Android versions reproduced on:
- device usb:336662528X product:xcover4ltexx model:SM_G390F device:xcover4lte transport_id:5
- device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:4
- device usb:336662528X product:zerofltexx model:SM_G920F device:zeroflte transport_id:15
In Version 2.1.0 annotation @Relation was only allowed for list types, if you used it on a non-list type the following runtime error occured:
error: Fields annotated with @Relation must be a List or Set.
Since Version 2.2.0 @Relation can be used on non-list types, in order to model relations with a single object reference.
This is handy if you have 1-to-1 relations and you don't have to explicitly get the first item from the result list, instead you get the object directly.
release notes:
One-to-One Relations: The restriction in POJO fields annotated with @Relation to be of type List or Set has been lifted, effectively allowing single-value relations to be represented.
It seems that this new feature is only supported up to a certain amount of table rows. In more details it means that if you run a query on tables with 100 rows, the returned POJOs have all valid non-null references to the object specified by the @Relation annotation. If you run the same query on tables with more than 999 rows (999 still works, 1000 will fail) the result will be that all returned POJOs have NULL as referenced object (see my example project).
If you use the list type with @Relation annotation you don't have this limitation.
Please refer to the attached example project unit test.
In the example project the same entities are used but with two different POJO types. One is using a List<> type annotated with @Relation, and the other is using the newly supported object type.
Android unit test show that the list type always works but the object type works up to 999 rows, after that it starts to fail.