Skip to content

Commit d3185ce

Browse files
committed
Merge branch 'compose-1.4' of github.com:holixfactory/bottomsheetdialog-compose
2 parents a8cae1f + fb8772a commit d3185ce

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ android {
4545

4646
dependencies {
4747
implementation project(":bottomsheetdialog-compose")
48-
implementation platform(Dependencies.composeBom)
4948
implementation Dependencies.composeUI
5049
implementation Dependencies.composeFoundation
5150
implementation Dependencies.composeMaterial

bottomsheetdialog-compose/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ android {
5050
}
5151

5252
dependencies {
53-
implementation platform(Dependencies.composeBom)
5453
implementation Dependencies.composeUI
5554
implementation Dependencies.composeFoundation
5655
implementation Dependencies.androidxActivityKtx

bottomsheetdialog-compose/src/main/kotlin/com/holix/android/bottomsheetdialog/compose/BottomSheetDialog.kt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package com.holix.android.bottomsheetdialog.compose
22

3-
import androidx.compose.foundation.gestures.Orientation
4-
import androidx.compose.foundation.gestures.rememberScrollableState
5-
import androidx.compose.foundation.gestures.scrollable
6-
import android.annotation.SuppressLint
73
import android.content.Context
84
import android.graphics.Outline
95
import android.os.Build
@@ -13,9 +9,11 @@ import androidx.activity.setViewTreeOnBackPressedDispatcherOwner
139
import androidx.annotation.FloatRange
1410
import androidx.annotation.IntRange
1511
import androidx.annotation.Px
12+
import androidx.compose.foundation.gestures.Orientation
13+
import androidx.compose.foundation.gestures.rememberScrollableState
14+
import androidx.compose.foundation.gestures.scrollable
1615
import androidx.compose.runtime.*
1716
import androidx.compose.runtime.saveable.rememberSaveable
18-
import androidx.compose.ui.ExperimentalComposeUiApi
1917
import androidx.compose.ui.Modifier
2018
import androidx.compose.ui.graphics.Color
2119
import androidx.compose.ui.graphics.compositeOver
@@ -32,8 +30,10 @@ import androidx.compose.ui.unit.dp
3230
import androidx.compose.ui.window.DialogWindowProvider
3331
import androidx.compose.ui.window.SecureFlagPolicy
3432
import androidx.core.view.WindowCompat
35-
import androidx.lifecycle.ViewTreeLifecycleOwner
36-
import androidx.lifecycle.ViewTreeViewModelStoreOwner
33+
import androidx.lifecycle.findViewTreeLifecycleOwner
34+
import androidx.lifecycle.findViewTreeViewModelStoreOwner
35+
import androidx.lifecycle.setViewTreeLifecycleOwner
36+
import androidx.lifecycle.setViewTreeViewModelStoreOwner
3737
import androidx.savedstate.findViewTreeSavedStateRegistryOwner
3838
import androidx.savedstate.setViewTreeSavedStateRegistryOwner
3939
import com.google.android.material.bottomsheet.BottomSheetBehavior.*
@@ -257,7 +257,6 @@ private val BlackScrimmed: (Color) -> Color = { original ->
257257
* @param properties [BottomSheetDialogProperties] for further customization of this dialog's behavior.
258258
* @param content The content to be displayed inside the dialog.
259259
*/
260-
@OptIn(ExperimentalComposeUiApi::class)
261260
@Composable
262261
fun BottomSheetDialog(
263262
onDismissRequest: () -> Unit,
@@ -428,8 +427,8 @@ private class BottomSheetDialogWrapper(
428427
// Turn of all clipping so shadows can be drawn outside the window
429428
(window.decorView as? ViewGroup)?.disableClipping()
430429
setContentView(bottomSheetDialogLayout)
431-
ViewTreeLifecycleOwner.set(bottomSheetDialogLayout, ViewTreeLifecycleOwner.get(composeView))
432-
ViewTreeViewModelStoreOwner.set(bottomSheetDialogLayout, ViewTreeViewModelStoreOwner.get(composeView))
430+
bottomSheetDialogLayout.setViewTreeLifecycleOwner(composeView.findViewTreeLifecycleOwner())
431+
bottomSheetDialogLayout.setViewTreeViewModelStoreOwner(composeView.findViewTreeViewModelStoreOwner())
433432
bottomSheetDialogLayout.setViewTreeOnBackPressedDispatcherOwner(this)
434433
bottomSheetDialogLayout.setViewTreeSavedStateRegistryOwner(
435434
composeView.findViewTreeSavedStateRegistryOwner()

buildSrc/src/main/kotlin/com/holix/android/bottomsheetdialog/compose/Configuration.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ object Configuration {
55
const val targetSdk = 33
66
const val minSdk = 21
77
const val majorVersion = 1
8-
const val minorVersion = 1
9-
const val patchVersion = 1
8+
const val minorVersion = 2
9+
const val patchVersion = 0
1010
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
11-
const val versionCode = 111
11+
const val versionCode = 120
1212
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
1313
const val artifactGroup = "com.holix.android"
1414
}

buildSrc/src/main/kotlin/com/holix/android/bottomsheetdialog/compose/Versions.kt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ package com.holix.android.bottomsheetdialog.compose
33
object Versions {
44
internal const val ANDROID_GRADLE_PLUGIN = "7.3.1"
55
internal const val GRADLE_NEXUS_PUBLISH_PLUGIN = "1.1.0"
6-
internal const val KOTLIN = "1.7.20"
6+
internal const val KOTLIN = "1.8.0"
77

88
internal const val MATERIAL = "1.8.0"
99
internal const val ANDROIDX_CORE_KTX = "1.9.0"
1010

1111
internal const val COMPOSE_BOM = "2023.01.00"
12-
const val COMPOSE_COMPILER = "1.3.2"
12+
internal const val COMPOSE = "1.4.0-beta01"
13+
const val COMPOSE_COMPILER = "1.4.1"
1314
internal const val ANDROIDX_ACTIVITY = "1.5.1"
1415

1516
internal const val COLOR_PICKER = "1.0.0"
@@ -27,11 +28,11 @@ object Dependencies {
2728
const val androidxCoreKtx = "androidx.core:core-ktx:${Versions.ANDROIDX_CORE_KTX}"
2829

2930
const val composeBom = "androidx.compose:compose-bom:${Versions.COMPOSE_BOM}"
30-
const val composeUI = "androidx.compose.ui:ui"
31-
const val composeRuntime = "androidx.compose.runtime:runtime"
32-
const val composeMaterial = "androidx.compose.material:material"
33-
const val composeFoundation = "androidx.compose.foundation:foundation"
34-
const val composeTooling = "androidx.compose.ui:ui-tooling"
31+
const val composeUI = "androidx.compose.ui:ui:${Versions.COMPOSE}"
32+
const val composeRuntime = "androidx.compose.runtime:runtime:${Versions.COMPOSE}"
33+
const val composeMaterial = "androidx.compose.material:material:${Versions.COMPOSE}"
34+
const val composeFoundation = "androidx.compose.foundation:foundation:${Versions.COMPOSE}"
35+
const val composeTooling = "androidx.compose.ui:ui-tooling:${Versions.COMPOSE}"
3536
const val composeActivity = "androidx.activity:activity-compose:${Versions.ANDROIDX_ACTIVITY}"
3637

3738
const val colorPicker = "com.github.skydoves:colorpicker-compose:${Versions.COLOR_PICKER}"

0 commit comments

Comments
 (0)