Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 1420b8888916b62f629a3beba865e6377002b3bc
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Aug 01 13:40:32 2022
Move sealed interface to expect/actual
This is required perhttps://kotlinlang.org/docs/sealed-classes.html#inheritance-in-multiplatform-projects
Unclear why it compiles in androidMain, will followup with JB
No API change. Metalava doesn't correctly handle default parameters in this situation filed as b/241009741 .
Bug: b/239962983
Test: ./gradlew :compose:ui:ui-text:cAT ANDROIDX_PROJECTS=COMPOSE ./gradlew :compose:desktop:desktop:desktop-samples:run -Pandroidx.compose.multiplatformEnabled=true --no-daemon
Relnote: "Paragraph is now expect|actual and defined for Android and Desktop."
Change-Id: Id387e52c4509ebcfd78e9b57b09a0ee8cd51b11f
M compose/ui/ui-text/build.gradle
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/api/restricted_current.ignore
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/SkiaParagraph.skiko.kt
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/Paragraph.skiko.kt
M compose/ui/ui-text/api/current.ignore
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/api/current.txt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/Paragraph.android.kt
https://android-review.googlesource.com/2169774
Branch: androidx-main
commit 1420b8888916b62f629a3beba865e6377002b3bc
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Aug 01 13:40:32 2022
Move sealed interface to expect/actual
This is required per
Unclear why it compiles in androidMain, will followup with JB
No API change. Metalava doesn't correctly handle default parameters in this situation filed as
Bug:
Test: ./gradlew :compose:ui:ui-text:cAT ANDROIDX_PROJECTS=COMPOSE ./gradlew :compose:desktop:desktop:desktop-samples:run -Pandroidx.compose.multiplatformEnabled=true --no-daemon
Relnote: "Paragraph is now expect|actual and defined for Android and Desktop."
Change-Id: Id387e52c4509ebcfd78e9b57b09a0ee8cd51b11f
M compose/ui/ui-text/build.gradle
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/api/restricted_current.ignore
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/SkiaParagraph.skiko.kt
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/Paragraph.skiko.kt
M compose/ui/ui-text/api/current.ignore
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/api/current.txt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/Paragraph.android.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 373a78e24af2670e40fe15320584bc655ed4f768
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Aug 01 11:35:56 2022
Apply sealed Paragraph to desktop build
Bug: b/239962983
Test: ANDROIDX_PROJECTS=COMPOSE ./gradlew :compose:desktop:desktop:desktop-samples:run -Pandroidx.compose.multiplatformEnabled=true --no-daemon
Change-Id: Ia029d64e86d6e9febb577ebedd548eb072530861
M compose/ui/ui-text/build.gradle
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/SkiaParagraph.skiko.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
https://android-review.googlesource.com/2169767
Branch: androidx-main
commit 373a78e24af2670e40fe15320584bc655ed4f768
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Aug 01 11:35:56 2022
Apply sealed Paragraph to desktop build
Bug:
Test: ANDROIDX_PROJECTS=COMPOSE ./gradlew :compose:desktop:desktop:desktop-samples:run -Pandroidx.compose.multiplatformEnabled=true --no-daemon
Change-Id: Ia029d64e86d6e9febb577ebedd548eb072530861
M compose/ui/ui-text/build.gradle
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/SkiaParagraph.skiko.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 6abfe8bf1231e0fd5403e0b0a54d4638e10fcc53
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jul 28 10:21:55 2022
Migrate Paragraph to sealed interface
This change is binary compatible, and source compatible.
There is no API for creating new implementations of Paragraph and participating in MultiParagraph.
Developers doing the following should:
1. Implementing a new platform - reach out as there is no (current) API that allows externally defined Paragraph to participate in Text/TextField.
2. Adding extensions to Paragraph - use extension functions
3. Adding state to Paragraph - this is not recommened, paragraph is immutable. Instead wrap using composition.
4. Intercepting calls to paragraph methods. This is not supported, and will currently break at random.
Bug: b/239962983
Test: created new library depending on 1.3.0-alpha02 with subclass of Paragraph, linked app against both library and andoridx with this change applied
Relnote: "interface Paragraph is now sealed interface Paragarph. There is no use case for subclassing paragraph, and we recommend reaching out if this change impacts you."
As research, reached out widely to see if there were any current subclasses.
Change-Id: If52470dbc601b83f41b49a7bd1e28c57b5e353d1
M compose/ui/ui-text/api/restricted_current.txt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/ActualParagraph.android.kt.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/api/restricted_current.ignore
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationLineHeightStyleTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/TextTestExtensions.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidParagraph.android.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidPargraphExt.kt
M compose/ui/ui-text/lint-baseline.xml
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphFillBoundingBoxesTest.kt
M compose/ui/ui-text/api/current.ignore
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTextDirectionTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt
https://android-review.googlesource.com/2168763
Branch: androidx-main
commit 6abfe8bf1231e0fd5403e0b0a54d4638e10fcc53
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jul 28 10:21:55 2022
Migrate Paragraph to sealed interface
This change is binary compatible, and source compatible.
There is no API for creating new implementations of Paragraph and participating in MultiParagraph.
Developers doing the following should:
1. Implementing a new platform - reach out as there is no (current) API that allows externally defined Paragraph to participate in Text/TextField.
2. Adding extensions to Paragraph - use extension functions
3. Adding state to Paragraph - this is not recommened, paragraph is immutable. Instead wrap using composition.
4. Intercepting calls to paragraph methods. This is not supported, and will currently break at random.
Bug:
Test: created new library depending on 1.3.0-alpha02 with subclass of Paragraph, linked app against both library and andoridx with this change applied
Relnote: "interface Paragraph is now sealed interface Paragarph. There is no use case for subclassing paragraph, and we recommend reaching out if this change impacts you."
As research, reached out widely to see if there were any current subclasses.
Change-Id: If52470dbc601b83f41b49a7bd1e28c57b5e353d1
M compose/ui/ui-text/api/restricted_current.txt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/ActualParagraph.android.kt.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/api/restricted_current.ignore
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationLineHeightStyleTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/TextTestExtensions.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidParagraph.android.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidPargraphExt.kt
M compose/ui/ui-text/lint-baseline.xml
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphFillBoundingBoxesTest.kt
M compose/ui/ui-text/api/current.ignore
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTextDirectionTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt
Description
interface Paragraph
is a source of constant API issues as we add new features.There is no known valid reason to subclass Paragraph outside of AndroidParagraph|SkiaParagraph.
Lets make Paragraph final using either a
sealed interface
or moving toParagraph2