Skip to content

Commit

Permalink
Merge pull request #1686 from google/1.5rc1
Browse files Browse the repository at this point in the history
Release v0.31.6rc
  • Loading branch information
bentrengrove committed Jul 27, 2023
2 parents 8eefcee + b834b9e commit 75a7e7b
Show file tree
Hide file tree
Showing 67 changed files with 269 additions and 269 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- compose-1.2
- compose-1.3
- compose-1.4
- compose-1.5
paths-ignore:
- '**.md'
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion adaptive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {
android {
namespace = "com.google.accompanist.adaptive"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@ internal class IgnoreFoldModifier(

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is IgnoreFoldModifier) return false
return true
return other is IgnoreFoldModifier
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface FoldAwareColumnScope {
* Ignore the fold when placing this child within the [FoldAwareColumn].
*/
@Stable
fun Modifier.ignoreFold(): Modifier
public fun Modifier.ignoreFold(): Modifier

/**
* Align the element horizontally within the [Column]. This alignment will have priority over
Expand All @@ -49,7 +49,7 @@ public interface FoldAwareColumnScope {
* @sample androidx.compose.foundation.layout.samples.SimpleAlignInColumn
*/
@Stable
fun Modifier.align(alignment: Alignment.Horizontal): Modifier
public fun Modifier.align(alignment: Alignment.Horizontal): Modifier

/**
* Position the element horizontally such that its [alignmentLine] aligns with sibling elements
Expand All @@ -68,7 +68,7 @@ public interface FoldAwareColumnScope {
* @sample androidx.compose.foundation.layout.samples.SimpleRelativeToSiblingsInColumn
*/
@Stable
fun Modifier.alignBy(alignmentLine: VerticalAlignmentLine): Modifier
public fun Modifier.alignBy(alignmentLine: VerticalAlignmentLine): Modifier

/**
* Position the element horizontally such that the alignment line for the content as
Expand All @@ -88,7 +88,7 @@ public interface FoldAwareColumnScope {
* @sample androidx.compose.foundation.layout.samples.SimpleRelativeToSiblings
*/
@Stable
fun Modifier.alignBy(alignmentLineBlock: (Measured) -> Int): Modifier
public fun Modifier.alignBy(alignmentLineBlock: (Measured) -> Int): Modifier
}

internal object FoldAwareColumnScopeInstance : FoldAwareColumnScope {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ internal data class OrientationIndependentConstraints(
val crossAxisMax: Int
) {
constructor(c: Constraints, orientation: LayoutOrientation) : this(
if (orientation === LayoutOrientation.Horizontal) c.minWidth else c.minHeight,
if (orientation === LayoutOrientation.Horizontal) c.maxWidth else c.maxHeight,
if (orientation === LayoutOrientation.Horizontal) c.minHeight else c.minWidth,
if (orientation === LayoutOrientation.Horizontal) c.maxHeight else c.maxWidth
if (orientation === Horizontal) c.minWidth else c.minHeight,
if (orientation === Horizontal) c.maxWidth else c.maxHeight,
if (orientation === Horizontal) c.minHeight else c.minWidth,
if (orientation === Horizontal) c.maxHeight else c.maxWidth
)

// Creates a new instance with the same main axis constraints and maximum tight cross axis.
Expand All @@ -251,23 +251,23 @@ internal data class OrientationIndependentConstraints(

// Given an orientation, resolves the current instance to traditional constraints.
fun toBoxConstraints(orientation: LayoutOrientation) =
if (orientation === LayoutOrientation.Horizontal) {
if (orientation === Horizontal) {
Constraints(mainAxisMin, mainAxisMax, crossAxisMin, crossAxisMax)
} else {
Constraints(crossAxisMin, crossAxisMax, mainAxisMin, mainAxisMax)
}

// Given an orientation, resolves the max width constraint this instance represents.
fun maxWidth(orientation: LayoutOrientation) =
if (orientation === LayoutOrientation.Horizontal) {
if (orientation === Horizontal) {
mainAxisMax
} else {
crossAxisMax
}

// Given an orientation, resolves the max height constraint this instance represents.
fun maxHeight(orientation: LayoutOrientation) =
if (orientation === LayoutOrientation.Horizontal) {
if (orientation === Horizontal) {
crossAxisMax
} else {
mainAxisMax
Expand All @@ -290,28 +290,28 @@ internal val RowColumnParentData?.isRelative: Boolean
get() = this.crossAxisAlignment?.isRelative ?: false

internal fun MinIntrinsicWidthMeasureBlock(orientation: LayoutOrientation) =
if (orientation == LayoutOrientation.Horizontal) {
if (orientation == Horizontal) {
IntrinsicMeasureBlocks.HorizontalMinWidth
} else {
IntrinsicMeasureBlocks.VerticalMinWidth
}

internal fun MinIntrinsicHeightMeasureBlock(orientation: LayoutOrientation) =
if (orientation == LayoutOrientation.Horizontal) {
if (orientation == Horizontal) {
IntrinsicMeasureBlocks.HorizontalMinHeight
} else {
IntrinsicMeasureBlocks.VerticalMinHeight
}

internal fun MaxIntrinsicWidthMeasureBlock(orientation: LayoutOrientation) =
if (orientation == LayoutOrientation.Horizontal) {
if (orientation == Horizontal) {
IntrinsicMeasureBlocks.HorizontalMaxWidth
} else {
IntrinsicMeasureBlocks.VerticalMaxWidth
}

internal fun MaxIntrinsicHeightMeasureBlock(orientation: LayoutOrientation) =
if (orientation == LayoutOrientation.Horizontal) {
if (orientation == Horizontal) {
IntrinsicMeasureBlocks.HorizontalMaxHeight
} else {
IntrinsicMeasureBlocks.VerticalMaxHeight
Expand All @@ -326,8 +326,8 @@ internal object IntrinsicMeasureBlocks {
{ w -> maxIntrinsicHeight(w) },
availableHeight,
mainAxisSpacing,
LayoutOrientation.Horizontal,
LayoutOrientation.Horizontal
Horizontal,
Horizontal
)
}
val VerticalMinWidth: (List<IntrinsicMeasurable>, Int, Int) -> Int =
Expand All @@ -338,8 +338,8 @@ internal object IntrinsicMeasureBlocks {
{ w -> maxIntrinsicHeight(w) },
availableHeight,
mainAxisSpacing,
LayoutOrientation.Vertical,
LayoutOrientation.Horizontal
Vertical,
Horizontal
)
}
val HorizontalMinHeight: (List<IntrinsicMeasurable>, Int, Int) -> Int =
Expand All @@ -350,8 +350,8 @@ internal object IntrinsicMeasureBlocks {
{ h -> maxIntrinsicWidth(h) },
availableWidth,
mainAxisSpacing,
LayoutOrientation.Horizontal,
LayoutOrientation.Vertical
Horizontal,
Vertical
)
}
val VerticalMinHeight: (List<IntrinsicMeasurable>, Int, Int) -> Int =
Expand All @@ -362,8 +362,8 @@ internal object IntrinsicMeasureBlocks {
{ h -> maxIntrinsicWidth(h) },
availableWidth,
mainAxisSpacing,
LayoutOrientation.Vertical,
LayoutOrientation.Vertical
Vertical,
Vertical
)
}
val HorizontalMaxWidth: (List<IntrinsicMeasurable>, Int, Int) -> Int =
Expand All @@ -374,8 +374,8 @@ internal object IntrinsicMeasureBlocks {
{ w -> maxIntrinsicHeight(w) },
availableHeight,
mainAxisSpacing,
LayoutOrientation.Horizontal,
LayoutOrientation.Horizontal
Horizontal,
Horizontal
)
}
val VerticalMaxWidth: (List<IntrinsicMeasurable>, Int, Int) -> Int =
Expand All @@ -386,8 +386,8 @@ internal object IntrinsicMeasureBlocks {
{ w -> maxIntrinsicHeight(w) },
availableHeight,
mainAxisSpacing,
LayoutOrientation.Vertical,
LayoutOrientation.Horizontal
Vertical,
Horizontal
)
}
val HorizontalMaxHeight: (List<IntrinsicMeasurable>, Int, Int) -> Int =
Expand All @@ -398,8 +398,8 @@ internal object IntrinsicMeasureBlocks {
{ h -> maxIntrinsicWidth(h) },
availableWidth,
mainAxisSpacing,
LayoutOrientation.Horizontal,
LayoutOrientation.Vertical
Horizontal,
Vertical
)
}
val VerticalMaxHeight: (List<IntrinsicMeasurable>, Int, Int) -> Int =
Expand All @@ -410,8 +410,8 @@ internal object IntrinsicMeasureBlocks {
{ h -> maxIntrinsicWidth(h) },
availableWidth,
mainAxisSpacing,
LayoutOrientation.Vertical,
LayoutOrientation.Vertical
Vertical,
Vertical
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,24 +191,24 @@ internal fun TwoPane(
@JvmInline
public value class FoldAwareConfiguration private constructor(private val value: Int) {

companion object {
public companion object {
/**
* The [TwoPane] will only be aware of horizontal folds only, splitting the content
* vertically.
*/
val HorizontalFoldsOnly = FoldAwareConfiguration(0)
public val HorizontalFoldsOnly: FoldAwareConfiguration = FoldAwareConfiguration(0)

/**
* The [TwoPane] will only be aware of vertical folds only, splitting the content
* horizontally.
*/
val VerticalFoldsOnly = FoldAwareConfiguration(1)
public val VerticalFoldsOnly: FoldAwareConfiguration = FoldAwareConfiguration(1)

/**
* The [TwoPane] will be aware of both horizontal and vertical folds, splitting the content
* vertically and horizontally respectively.
*/
val AllFolds = FoldAwareConfiguration(2)
public val AllFolds: FoldAwareConfiguration = FoldAwareConfiguration(2)
}
}

Expand Down Expand Up @@ -268,7 +268,7 @@ private fun interface ConditionalTwoPaneStrategy {
* @param layoutDirection the [LayoutDirection] for measuring and laying out
* @param layoutCoordinates the [LayoutCoordinates] of the [TwoPane]
*/
public fun calculateSplitResult(
fun calculateSplitResult(
density: Density,
layoutDirection: LayoutDirection,
layoutCoordinates: LayoutCoordinates
Expand Down
2 changes: 1 addition & 1 deletion appcompat-theme/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {
android {
namespace = "com.google.accompanist.appcompattheme"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ import androidx.core.content.res.use
"""
)
@Composable
fun AppCompatTheme(
public fun AppCompatTheme(
context: Context = LocalContext.current,
readColors: Boolean = true,
readTypography: Boolean = true,
Expand Down Expand Up @@ -144,7 +144,7 @@ fun AppCompatTheme(
For more migration information, please visit https://google.github.io/accompanist/appcompat-theme/#migration
"""
)
data class ThemeParameters(
public data class ThemeParameters(
val colors: Colors?,
val typography: Typography?
)
Expand All @@ -170,7 +170,7 @@ data class ThemeParameters(
For more migration information, please visit https://google.github.io/accompanist/appcompat-theme/#migration
"""
)
fun Context.createAppCompatTheme(
public fun Context.createAppCompatTheme(
readColors: Boolean = true,
readTypography: Boolean = true
): ThemeParameters = obtainStyledAttributes(R.styleable.AppCompatThemeAdapterTheme).use { ta ->
Expand Down
2 changes: 1 addition & 1 deletion docs/testharness.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This content is the `@Composable` UI under test, so standard usage would look li
@Test
fun example() {
composeTestRule.setContent {
TestHarness(/* ... */) {
TestHarness {
MyComponent()
}
}
Expand Down
2 changes: 1 addition & 1 deletion drawablepainter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {
android {
namespace = "com.google.accompanist.drawablepainter"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ private val MAIN_HANDLER by lazy(LazyThreadSafetyMode.NONE) {
*
* Instances are usually retrieved from [rememberDrawablePainter].
*/
class DrawablePainter(
val drawable: Drawable
public class DrawablePainter(
public val drawable: Drawable
) : Painter(), RememberObserver {
private var drawInvalidateTick by mutableStateOf(0)
private var drawableIntrinsicSize by mutableStateOf(drawable.intrinsicSize)
Expand Down Expand Up @@ -90,7 +90,7 @@ class DrawablePainter(
if (drawable is Animatable) drawable.start()
}

override fun onAbandoned() = onForgotten()
override fun onAbandoned(): Unit = onForgotten()

override fun onForgotten() {
if (drawable is Animatable) drawable.stop()
Expand Down Expand Up @@ -149,7 +149,7 @@ class DrawablePainter(
* @sample com.google.accompanist.sample.drawablepainter.BasicSample
*/
@Composable
fun rememberDrawablePainter(drawable: Drawable?): Painter = remember(drawable) {
public fun rememberDrawablePainter(drawable: Drawable?): Painter = remember(drawable) {
when (drawable) {
null -> EmptyPainter
is ColorDrawable -> ColorPainter(Color(drawable.color))
Expand Down
2 changes: 1 addition & 1 deletion flowlayout/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {
android {
namespace = "com.google.accompanist.flowlayout"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ systemProp.org.gradle.internal.http.socketTimeout=120000

GROUP=com.google.accompanist
# !! No longer need to update this manually when using a Compose SNAPSHOT
VERSION_NAME=0.31.6-SNAPSHOT
VERSION_NAME=0.31.6-rc

POM_DESCRIPTION=Utilities for Jetpack Compose

Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[versions]

compose = "1.5.0-beta03"
composeCompiler = "1.4.8"
compose = "1.5.0-rc01"
composeCompiler = "1.5.1"
composeMaterial3 = "1.0.1"
composesnapshot = "-" # a single character = no snapshot

dokka = "1.8.10"

# gradlePlugin and lint need to be updated together
gradlePlugin = "8.0.0"
gradlePlugin = "8.1.0"
lintMinCompose = "30.0.0"

ktlint = "0.45.2"
kotlin = "1.8.22"
kotlin = "1.9.0"
coroutines = "1.6.4"
okhttp = "3.12.13"
coil = "1.3.2"
Expand Down
Loading

0 comments on commit 75a7e7b

Please sign in to comment.