Skip to content

Commit a2e7fd3

Browse files
committed
Jetpack Compose BOM added.
1 parent 8eed2f3 commit a2e7fd3

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ buildscript {
1212
junit_version = '4.13.2'
1313
kotlin_version = '1.9.20'
1414
kotlin_compiler_extension_version = '1.5.5'
15-
androidx_compose_version = '1.5.4'
16-
androidx_compose_activity_version = '1.8.1'
15+
androidx_compose_bom_version = '2023.10.01'
1716
androidx_appcompat_version = '1.6.1'
1817
androidx_preference_version = '1.2.1'
1918
androidx_core_version = '1.12.0'

library/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,17 @@ dependencies {
9090
// implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
9191

9292
// https://mvnrepository.com/artifact/androidx.compose
93-
implementation "androidx.compose.ui:ui:$androidx_compose_version"
94-
implementation "androidx.compose.material:material:$androidx_compose_version"
95-
implementation "androidx.compose.foundation:foundation:$androidx_compose_version"
96-
// implementation "androidx.compose.material:material-icons-core:$androidx_compose_version"
97-
// implementation "androidx.compose.material:material-icons-extended:$androidx_compose_version"
93+
// https://developer.android.com/jetpack/compose/tooling#bom
94+
implementation platform("androidx.compose:compose-bom:$androidx_compose_bom_version")
95+
// implementation "androidx.compose.material:material-icons-core"
96+
// implementation "androidx.compose.material:material-icons-extended"
97+
implementation "androidx.compose.foundation:foundation"
98+
implementation "androidx.compose.material:material"
99+
implementation "androidx.compose.ui:ui"
98100

99101
/* Composable Preview */
100-
debugImplementation "androidx.compose.ui:ui-tooling:$androidx_compose_version"
101-
debugImplementation "androidx.customview:customview-poolingcontainer:1.0.0"
102+
debugImplementation "androidx.compose.ui:ui-tooling"
103+
debugImplementation "androidx.customview:customview-poolingcontainer"
102104
}
103105

104106

library/src/main/java/io/syslogic/colorpicker/compose/ColorPickerComponent.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import androidx.compose.ui.res.dimensionResource
2929
import androidx.compose.ui.res.painterResource
3030
import androidx.compose.ui.res.stringResource
3131
import androidx.compose.ui.text.style.TextAlign
32+
import androidx.compose.ui.tooling.preview.Preview
3233
import androidx.compose.ui.unit.IntSize
3334

3435
import io.syslogic.colorpicker.OnColorChangedListener
@@ -41,6 +42,7 @@ import io.syslogic.colorpicker.compose.LayoutId.*
4142
* @author Martin Zeitler
4243
*/
4344
@Composable
45+
@Preview()
4446
fun ColorPickerComponent(
4547
initialColor: Color = Color.Unspecified,
4648
onColorChanged: OnColorChangedListener?,

mobile/build.gradle

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@ dependencies {
8181
implementation "androidx.navigation:navigation-ui-ktx:$androidx_navigation_version"
8282

8383
// https://mvnrepository.com/artifact/androidx.compose
84-
// https://developer.android.com/jetpack/androidx/releases/compose
85-
debugImplementation "androidx.compose.ui:ui-tooling-preview:$androidx_compose_version"
86-
implementation "androidx.activity:activity-compose:$androidx_compose_activity_version"
87-
implementation "androidx.compose.foundation:foundation:$androidx_compose_version"
88-
implementation "androidx.compose.material:material:$androidx_compose_version"
89-
implementation "androidx.compose.runtime:runtime:$androidx_compose_version"
90-
implementation "androidx.compose.ui:ui:$androidx_compose_version"
84+
// https://developer.android.com/jetpack/compose/tooling#bom
85+
implementation platform("androidx.compose:compose-bom:$androidx_compose_bom_version")
86+
debugImplementation "androidx.compose.ui:ui-tooling-preview"
87+
implementation "androidx.activity:activity-compose"
88+
implementation "androidx.compose.foundation:foundation"
89+
implementation "androidx.compose.material:material"
90+
implementation "androidx.compose.runtime:runtime"
91+
implementation "androidx.compose.ui:ui"
9192

9293
// jUnit
9394
testImplementation "junit:junit:$junit_version"
@@ -122,11 +123,11 @@ dependencies {
122123
// androidTestImplementation "androidx.test.espresso:espresso-idling-resource:$androidx_test_espresso_version"
123124

124125
// Test rules and transitive dependencies:
125-
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$androidx_compose_version")
126+
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
126127

127128
// Needed for createComposeRule, but not createAndroidComposeRule:
128129
//noinspection GradleDependency
129-
debugImplementation("androidx.compose.ui:ui-test-manifest:$androidx_compose_version")
130+
debugImplementation("androidx.compose.ui:ui-test-manifest")
130131
}
131132

132133
// disable caching

0 commit comments

Comments
 (0)