Status Update
Comments
al...@google.com <al...@google.com> #2
For Kotlin 2.0 and KSP 2.0 the Cannot change attributes of configuration ':composeApp:debugFrameworkIosX64' after it has been locked for mutation
really seems like a KSP issue. You should file a bug in their repository with a sample app if possible.
If you downgrade to Kotlin 1.9 then things 'should' work, there are example apps out there with such configuration, like the following one:
al...@google.com <al...@google.com> #3
Will try to use the example provided by you to check if it fixes the issue.
al...@google.com <al...@google.com> #4
Note that this issue happens when applying the Compose, KSP and Room Plugin together in Kotlin 2.0.x, the workaround for now is to not use the Room Gradle Plugin and instead specify the schema location vis KSP arguments:
// In the build.gradle
ksp {
arg("room.schemaLocation", "${projectDir}/schemas")
}
al...@google.com <al...@google.com> #5
Hi, I encountered a similar problem and was able to resolve it by updating the dependencies
room = "2.7.0-alpha08"
ksp = "2.0.20-1.0.25"
compose-plugin = "1.6.11"
kotlin = "2.0.20"
ap...@google.com <ap...@google.com> #6
Branch: metalava-main
commit 3626071fe19af6796905feaea82c39c7cef5ea91
Author: Alan Viverette <alanv@google.com>
Date: Wed Jun 21 15:19:36 2023
Inject synthetic annotation to denote compatibility suppression
Bug: 287516207
Test: ApiFilTest
Test: CompatibilityCheckTest
Change-Id: Icbc8cd37cd9a9011ae663010677335d35186eff9
M src/main/java/com/android/tools/metalava/model/ModifierList.kt
M src/test/java/com/android/tools/metalava/ApiFileTest.kt
M src/test/java/com/android/tools/metalava/CompatibilityCheckTest.kt
al...@google.com <al...@google.com> #7
Remaining steps:
- Update Metalava prebuilt used by AndroidX
- Regenerate API files (again)
al...@google.com <al...@google.com>
bu...@google.com <bu...@google.com> #8
Bugjuggler:
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 513502c963a93d5390afa38b1814270ed3eafbcc
Author: Alan Viverette <alanv@google.com>
Date: Thu Jun 29 10:53:59 2023
Update Metalava to tip-of-tree, add Clikt dependency
Updates API files to include @SuppressCompatibility annotation. Uses
ignore files for now since I'm not regenerating historical API files.
Bug: 287516207
Test: ./gradlew checkApi
Relnote: Updated API files to annotate compatibility suppression
Change-Id: I8e87ae292b38fac1886001f5317acda1592f174b
M benchmark/benchmark-common/api/current.txt
M benchmark/benchmark-common/api/restricted_current.txt
M benchmark/benchmark-junit4/api/current.txt
M benchmark/benchmark-junit4/api/restricted_current.txt
M benchmark/benchmark-macro/api/current.txt
M benchmark/benchmark-macro/api/restricted_current.txt
M camera/camera-camera2-pipe-integration/api/current.txt
M camera/camera-camera2-pipe-integration/api/restricted_current.txt
M camera/camera-camera2/api/1.3.0-beta01.txt
M camera/camera-camera2/api/current.txt
M camera/camera-camera2/api/restricted_1.3.0-beta01.txt
M camera/camera-camera2/api/restricted_current.txt
M camera/camera-core/api/1.3.0-beta01.txt
M camera/camera-core/api/current.txt
M camera/camera-core/api/restricted_1.3.0-beta01.txt
M camera/camera-core/api/restricted_current.txt
M camera/camera-lifecycle/api/1.3.0-beta01.txt
M camera/camera-lifecycle/api/current.txt
M camera/camera-lifecycle/api/restricted_1.3.0-beta01.txt
M camera/camera-lifecycle/api/restricted_current.txt
M camera/camera-view/api/1.3.0-beta01.txt
A camera/camera-view/api/current.ignore
M camera/camera-view/api/current.txt
M camera/camera-view/api/restricted_1.3.0-beta01.txt
A camera/camera-view/api/restricted_current.ignore
M camera/camera-view/api/restricted_current.txt
A car/app/app-automotive/api/current.ignore
M car/app/app-automotive/api/current.txt
A car/app/app-automotive/api/restricted_current.ignore
M car/app/app-automotive/api/restricted_current.txt
A car/app/app-testing/api/current.ignore
M car/app/app-testing/api/current.txt
M car/app/app-testing/api/restricted_current.txt
A car/app/app/api/current.ignore
M car/app/app/api/current.txt
A car/app/app/api/restricted_current.ignore
M car/app/app/api/restricted_current.txt
M car/app/app/build.gradle
D compose/animation/animation-core/api/current.ignore
M compose/animation/animation-core/api/current.txt
D compose/animation/animation-core/api/restricted_current.ignore
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation-graphics/api/current.txt
M compose/animation/animation-graphics/api/restricted_current.txt
D compose/animation/animation/api/current.ignore
M compose/animation/animation/api/current.txt
D compose/animation/animation/api/restricted_current.ignore
M compose/animation/animation/api/restricted_current.txt
M compose/foundation/foundation-layout/api/current.txt
M compose/foundation/foundation-layout/api/restricted_current.txt
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material3/material3-adaptive/api/current.txt
M compose/material3/material3-adaptive/api/restricted_current.txt
M compose/material3/material3-window-size-class/api/current.txt
M compose/material3/material3-window-size-class/api/restricted_current.txt
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
D compose/runtime/runtime-livedata/api/current.ignore
D compose/runtime/runtime-livedata/api/restricted_current.ignore
D compose/runtime/runtime-rxjava2/api/current.ignore
D compose/runtime/runtime-rxjava2/api/restricted_current.ignore
D compose/runtime/runtime-rxjava3/api/current.ignore
D compose/runtime/runtime-rxjava3/api/restricted_current.ignore
D compose/runtime/runtime-saveable/api/current.ignore
D compose/runtime/runtime-saveable/api/restricted_current.ignore
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/restricted_current.txt
M compose/ui/ui-graphics/api/current.txt
M compose/ui/ui-graphics/api/restricted_current.txt
M compose/ui/ui-test-junit4/api/current.ignore
M compose/ui/ui-test-junit4/api/current.txt
D compose/ui/ui-test-junit4/api/restricted_current.ignore
M compose/ui/ui-test-junit4/api/restricted_current.txt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-tooling-data/api/current.txt
M compose/ui/ui-tooling-data/api/restricted_current.txt
D compose/ui/ui-tooling-preview/api/current.ignore
D compose/ui/ui-tooling-preview/api/restricted_current.ignore
M compose/ui/ui-tooling/api/current.ignore
M compose/ui/ui-tooling/api/current.txt
D compose/ui/ui-tooling/api/restricted_current.ignore
M compose/ui/ui-tooling/api/restricted_current.txt
M compose/ui/ui-unit/api/current.txt
M compose/ui/ui-unit/api/restricted_current.txt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/restricted_current.ignore
M compose/ui/ui/api/restricted_current.txt
M constraintlayout/constraintlayout-compose/api/current.txt
M constraintlayout/constraintlayout-compose/api/restricted_current.txt
M core/core/api/current.txt
M core/core/api/restricted_current.txt
M datastore/datastore-core/api/current.txt
M datastore/datastore-core/api/restricted_current.txt
M datastore/datastore-rxjava2/api/current.ignore
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
M datastore/datastore-rxjava3/api/current.ignore
M datastore/datastore-rxjava3/api/current.txt
M datastore/datastore-rxjava3/api/restricted_current.txt
M fragment/fragment/api/current.txt
M fragment/fragment/api/restricted_current.txt
A glance/glance-appwidget/api/current.ignore
M glance/glance-appwidget/api/current.txt
A glance/glance-appwidget/api/restricted_current.ignore
M glance/glance-appwidget/api/restricted_current.txt
M glance/glance-preview/api/current.txt
M glance/glance-preview/api/restricted_current.txt
M glance/glance-wear-tiles/api/current.txt
M glance/glance-wear-tiles/api/restricted_current.txt
M glance/glance/api/current.txt
M glance/glance/api/restricted_current.txt
M gradle/verification-keyring.keys
M gradle/verification-metadata.xml
M graphics/graphics-path/api/current.txt
M graphics/graphics-path/api/restricted_current.txt
D lifecycle/lifecycle-viewmodel-compose/api/current.ignore
M lifecycle/lifecycle-viewmodel-compose/api/current.txt
D lifecycle/lifecycle-viewmodel-compose/api/restricted_current.ignore
M lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
D navigation/navigation-fragment/api/current.ignore
D navigation/navigation-fragment/api/restricted_current.ignore
M navigation/navigation-runtime/api/2.7.0-beta02.txt
M navigation/navigation-runtime/api/current.txt
M navigation/navigation-runtime/api/restricted_2.7.0-beta02.txt
M navigation/navigation-runtime/api/restricted_current.txt
M navigation/navigation-ui/api/2.7.0-beta02.txt
M navigation/navigation-ui/api/current.txt
M navigation/navigation-ui/api/restricted_2.7.0-beta02.txt
M navigation/navigation-ui/api/restricted_current.txt
D paging/paging-common/api/current.ignore
M paging/paging-common/api/current.txt
D paging/paging-common/api/restricted_current.ignore
M paging/paging-common/api/restricted_current.txt
M paging/paging-guava/api/current.ignore
M paging/paging-guava/api/current.txt
M paging/paging-guava/api/restricted_current.ignore
M paging/paging-guava/api/restricted_current.txt
D paging/paging-runtime/api/current.ignore
D paging/paging-runtime/api/restricted_current.ignore
M paging/paging-rxjava2/api/current.ignore
M paging/paging-rxjava2/api/current.txt
M paging/paging-rxjava2/api/restricted_current.ignore
M paging/paging-rxjava2/api/restricted_current.txt
M paging/paging-rxjava3/api/current.ignore
M paging/paging-rxjava3/api/current.txt
M paging/paging-rxjava3/api/restricted_current.ignore
M paging/paging-rxjava3/api/restricted_current.txt
M playground-common/playground.properties
M room/room-runtime/api/current.txt
M room/room-runtime/api/restricted_current.txt
M tv/tv-foundation/api/current.txt
M tv/tv-foundation/api/restricted_current.txt
M tv/tv-material/api/current.txt
M tv/tv-material/api/restricted_current.txt
M viewpager2/viewpager2/api/1.1.0-beta03.txt
M viewpager2/viewpager2/api/current.txt
M viewpager2/viewpager2/api/restricted_1.1.0-beta03.txt
M viewpager2/viewpager2/api/restricted_current.txt
M wear/compose/compose-foundation/api/current.txt
M wear/compose/compose-foundation/api/restricted_current.txt
M wear/compose/compose-material/api/current.txt
M wear/compose/compose-material/api/restricted_current.txt
M wear/compose/compose-material3/api/current.txt
M wear/compose/compose-material3/api/restricted_current.txt
M wear/protolayout/protolayout-expression/api/1.0.0-beta01.txt
M wear/protolayout/protolayout-expression/api/current.txt
M wear/protolayout/protolayout-expression/api/restricted_1.0.0-beta01.txt
M wear/protolayout/protolayout-expression/api/restricted_current.txt
M wear/protolayout/protolayout-material/api/1.0.0-beta01.txt
A wear/protolayout/protolayout-material/api/current.ignore
M wear/protolayout/protolayout-material/api/current.txt
M wear/protolayout/protolayout-material/api/restricted_1.0.0-beta01.txt
A wear/protolayout/protolayout-material/api/restricted_current.ignore
M wear/protolayout/protolayout-material/api/restricted_current.txt
M wear/protolayout/protolayout/api/1.0.0-beta01.txt
A wear/protolayout/protolayout/api/current.ignore
M wear/protolayout/protolayout/api/current.txt
M wear/protolayout/protolayout/api/restricted_1.0.0-beta01.txt
A wear/protolayout/protolayout/api/restricted_current.ignore
M wear/protolayout/protolayout/api/restricted_current.txt
M wear/tiles/tiles/api/1.2.0-beta01.txt
M wear/tiles/tiles/api/current.txt
M wear/tiles/tiles/api/restricted_1.2.0-beta01.txt
M wear/tiles/tiles/api/restricted_current.txt
M wear/watchface/watchface-client/api/current.txt
M wear/watchface/watchface-client/api/restricted_current.txt
M wear/watchface/watchface-complications-data/api/current.txt
M wear/watchface/watchface-complications-data/api/restricted_current.txt
A wear/watchface/watchface-data/api/current.ignore
M wear/watchface/watchface-data/api/current.txt
M wear/watchface/watchface-data/api/restricted_current.txt
M wear/watchface/watchface/api/current.txt
M wear/watchface/watchface/api/restricted_current.txt
A window/window-java/api/current.ignore
M window/window-java/api/current.txt
M window/window-java/api/restricted_current.txt
M window/window/api/current.txt
M window/window/api/restricted_current.txt
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit a68c900a0f37cb297c0c4e563546665c739833ee
Author: Alan Viverette <alanv@google.com>
Date: Tue Jun 27 16:22:40 2023
Update Metalava to tip-of-tree, add Clikt dependency
Bug: 287516207
Test: ./gradlew checkApi
Change-Id: I656bc62be01154e3424faaf8388205a990e105ec
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.jar
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.jar.md5
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.jar.sha1
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.module
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.module.md5
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.module.sha1
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.pom
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.pom.md5
M com/android/tools/metalava/metalava/1.0.0-alpha09/metalava-1.0.0-alpha09.pom.sha1
A com/github/ajalt/clikt/clikt-jvm/3.5.3/LICENSE
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3-sources.jar
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3-sources.jar.asc
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3-sources.jar.asc.md5
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3-sources.jar.asc.sha1
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3-sources.jar.md5
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3-sources.jar.sha1
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.jar
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.jar.asc
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.jar.asc.md5
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.jar.asc.sha1
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.jar.md5
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.jar.sha1
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.module
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.module.asc
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.module.asc.md5
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.module.asc.sha1
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.module.md5
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.module.sha1
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.pom
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.pom.md5
A com/github/ajalt/clikt/clikt-jvm/3.5.3/clikt-jvm-3.5.3.pom.sha1
Description
The conditional compatibility checking based on experimental annotations only checks if an API is currently experimental, and raises compatibility errors if a previously experimental API changes. This creates compatibility errors that weren't present before.
As an example:
androidx.benchmark.macro.junit4.BaselineProfileRule
was experimental in 1.1.0-beta05 with a method namedcollectBaselineProfile
.public_plus_experimental_1.1.0-beta05.txt
but not1.1.0-beta05.txt
.BaselineProfileRule
had the experimental annotation removed, and thecollectBaselineProfile
method was renamed tocollect
.BaselineProfileRule
was previously experimental and not present in1.1.0-beta05.txt
, renaming thecollect
method did not cause a compatibility error.1.1.0-beta05.txt
adds an entry forBaselineProfileRule
with the experimental annotation since experimental APIs are now tracked in the main API file.checkApi
for1.1.0-beta05.txt
andcurrent.txt
now raises a compatibility error saying the methodcollectBaselineProfile
was removed.