Skip to content

Commit 1d1f9b1

Browse files
committed
Bump the project version, add 2 opt-in annotations ExperimentalApi and LikelyInconsistentApi, and mark the Modifier.wrapContent...() modifier functions with them
1 parent fb7f41a commit 1d1f9b1

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

buildSrc/src/main/kotlin/VersionsAndDependencies.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import com.huanshankeji.CommonDependencies
22
import org.jetbrains.compose.ComposeBuildConfig
33

4-
val projectVersion = "0.5.0-SNAPSHOT"
4+
val projectVersion = "0.5.1-SNAPSHOT"
55

66
val commonDependencies = CommonDependencies()
77

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.huanshankeji.compose
2+
3+
@RequiresOptIn(
4+
"This API is experimental. It could change in the future without notice.",
5+
RequiresOptIn.Level.WARNING
6+
)
7+
@Retention(AnnotationRetention.BINARY)
8+
annotation class ExperimentalApi
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.huanshankeji.compose
2+
3+
@RequiresOptIn(
4+
"This API is likely to be inconsistent now on Compose UI and Compose HTML, which could affect the final visual effect. " +
5+
"Please verify on both kinds of targets to make sure it works as expected.",
6+
RequiresOptIn.Level.WARNING
7+
)
8+
@Retention(AnnotationRetention.BINARY)
9+
annotation class LikelyInconsistentApi

common/src/commonMain/kotlin/com/huanshankeji/compose/foundation/layout/Size.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import androidx.annotation.FloatRange
44
import androidx.compose.runtime.Stable
55
import androidx.compose.ui.unit.Dp
66
import androidx.compose.ui.unit.DpSize
7+
import com.huanshankeji.compose.ExperimentalApi
8+
import com.huanshankeji.compose.LikelyInconsistentApi
79
import com.huanshankeji.compose.foundation.layout.ext.fillMaxHeightStretch
810
import com.huanshankeji.compose.foundation.layout.ext.fillMaxSizeStretch
911
import com.huanshankeji.compose.foundation.layout.ext.fillMaxWidthStretch
@@ -57,11 +59,17 @@ expect fun Modifier.fillMaxHeight(@FloatRange(from = 0.0, to = 1.0) fraction: Fl
5759
@Stable
5860
expect fun Modifier.fillMaxSize(@FloatRange(from = 0.0, to = 1.0) fraction: Float = 1f): Modifier
5961

62+
@ExperimentalApi
63+
@LikelyInconsistentApi
6064
@Stable
6165
expect fun Modifier.wrapContentWidth(): Modifier
6266

67+
@ExperimentalApi
68+
@LikelyInconsistentApi
6369
@Stable
6470
expect fun Modifier.wrapContentHeight(): Modifier
6571

72+
@ExperimentalApi
73+
@LikelyInconsistentApi
6674
@Stable
6775
expect fun Modifier.wrapContentSize(): Modifier

0 commit comments

Comments
 (0)