Version 1.4.0-alpha05 out today! :tada: - Added f...
# compose
c
Version 1.4.0-alpha05 out today! 🎉 • Added full line span support to
LazyStaggeredGrid
(I28252) • Adding experimental
onHover
to
ClickableText
(I6938f) • Introduced new experimental overloads for the
runComposeUiTest
function and
create*ComposeRule
functions that accept
CoroutineContext
parameters. The context will be used for the test composition and any
LaunchedEffect
and
rememberCoroutineScope()
calls in the composition. (I10614, b/265177763) • Merges the pre/post APIs of
OverscrollEffect
into combined 'decorator'
applyToScroll
and
applyToFling
functions. See the updated samples in the documentation for examples of how to implement an overscroll effect with the new API shape. (I8a9c4, b/255554340) •
LineBreak
and
Hyphens
APIs in
TextStyle
are graduated to stable. (Ic1e1d) • The cursor in text fields will now continue to blink even when animations are disabled. (I95e70, b/265177763) •
Modifier.basicMarquee
now animates even when animations are disabled in the system settings. (I23389, b/262298306, b/265177763) • Fixed an issue where
ModalBottomSheetLayout's HalfExpanded
state was calculated incorrectly and the sheet would appear to be floating. (I8c615, b/265610459) • Fixed a bug in
ModalBottomSheetLayout
where the sheet would crash when going from the hidden to a visible state in some circumstances. (Ia9265, b/265444789) • Introduced new experimental overloads for the
runComposeUiTest
function and
create*ComposeRule
functions that accept
CoroutineContext
parameters. The context will be used for the test composition and any
LaunchedEffect
and
rememberCoroutineScope()
calls in the composition. (I10614, b/265177763) • Add a new API to track 1 dimensional velocity (If5a82) •
FocusRequester
is now marked as
@Stable
. (I580ee) • Remove an experimental annotation from the
DialogProperties
constructor that takes a
usePlatformDefaultWidth
parameter. (Ic4048) • Added function to calculation position and tangent at a distance on a path - with
PathMeasure.getPosition()
and
PathMeasure.getTangent()
(I3b47c) • Removed accidentally exposed public setter on
PlatformParagraphStyle
. (I07f47) • More type/nullability of inline/deprecated-hidden functions (I24f91) • Add
AnnotatedString.hasStringAnnotations
to query for annotations with zero-allocations. (I94dfe, b/246960758) • Added a new overload for
TextMeasurer.measure
function which takes in a
String
as text. (I47b2d, b/242705342) •
notifyFocusedRect
methods in
TextInputSession
and
TextInputService
are not deprecated again. (I23a04, b/262648050) No m3 updates this time around
🦜 14
thank you color 1
K 7
jetpack compose 17
a
Is it just me or does alpha05 seem to require kotlin 1.8? I did not update my compiler version (still using 1.3.2) but hit a lot of duplicate symbols errors starting with Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlinkotlin stdlib1.8.0) and kotlin-stdlib-jdk8-1.7.20 (org.jetbrains.kotlinkotlin stdlib jdk81.7.20) didn't see this with previous alphas
e
looks like you have mixed-up stdlib versions in your dependencies. Kotlin Gradle Plugin 1.8 tries to help avoid that, but the more complete solution (which works on earlier versions as well) is to use kotlin-bom
a
My project only declared that I use 1.7.20 plugin in my test project (default compose project created by android studio IDE, no stdlib versions in dependencies listed), guess this is a known issue - https://youtrack.jetbrains.com/issue/KT-55297/kotlin-stdlib-should-declare-constraints-on-kotlin-stdlib-jdk8-and-kotlin-stdlib-jdk7
e
right, you can either
Copy code
dependencies {
    implementation(platform(kotlin("bom", "1.8.0")))
}
or follow the directions at https://docs.gradle.org/current/userguide/dependency_version_alignment.html#sec:align-versions-unpublished and write
Copy code
abstract class KotlinAlignmentRule : ComponentMetadataRule {
    override fun execute(ctx: ComponentMetadataContext) = with(ctx.details) {
        if (id.group == "org.jetbrains.kotlin") {
            belongsTo("org.jetbrains.kotlin:kotlin-bom:${id.version}", false)
        }
    }
}
dependencies {
    components.all<KotlinAlignmentRule>()
}
to ensure no mismatches
p
Just faced the same and
enforcedPlatform
did the trick