Skip to content

Commit

Permalink
[devbricksx-compose][DEV]: remove BOM dependency of Compose. It canno…
Browse files Browse the repository at this point in the history
…t be inherited when publish maven;
  • Loading branch information
dailystudio committed Sep 1, 2023
1 parent 26b6c8d commit 7e5bf1d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ buildscript {
ext.kotlin_version = depVersions.kotlin()
ext.kotlin_compiler_ext_version = depVersions.kotlinCompilerExtension()
ext.ksp_version = depVersions.ksp()
ext.compose_version = depVersions.compose()
ext.nav_version = depVersions.navigation()
ext.coil_version = depVersions.coil()
ext.devkit_version = "${versions.devBricksXVersion()}-${depVersions.devKit()}"
Expand Down
5 changes: 5 additions & 0 deletions buildscripts/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ ext.depVersions = [
ext.depVersions.all(versionsFile)['NAVIGATION']
},

compose: { versionsFile = "$rootDir/dep_versions.properties" ->
ext.depVersions.all(versionsFile)['COMPOSE']
},

coil: { versionsFile = "$rootDir/dep_versions.properties" ->
ext.depVersions.all(versionsFile)['COIL']
},
Expand All @@ -73,6 +77,7 @@ ext.depVersions = [
println("using Kotlin Compiler Extension (Compose): ${ext.depVersions.kotlinCompilerExtension()}")
println("using KSP: ${ext.depVersions.ksp()}")
println("using ROOM: ${ext.depVersions.room()}")
println("using Compose: ${ext.depVersions.compose()}")
println("using Navigation: ${ext.depVersions.navigation()}")
println("using Coil: ${ext.depVersions.coil()}")
println("using Java: ${ext.depVersions.java()}")
Expand Down
3 changes: 2 additions & 1 deletion dep_versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ KOTLIN=1.9.0
KSP=1.9.0-1.0.11
KOTLIN_COMPILER_EXT=1.5.1
ROOM=2.5.2
NAVIGATION=2.7.0
COMPOSE=1.5.0
NAVIGATION=2.7.1
COIL=2.4.0
DEVKIT=1.0.7
JAVA=17
21 changes: 11 additions & 10 deletions devbricksx-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,22 @@ dependencies {

api project(":devbricksx")

def composeBom =
platform("androidx.compose:compose-bom:${project.ext.composeBomVersion}")
api composeBom
androidTestApi composeBom
// Cannot inherit BOM in maven publish
// def composeBom =
// platform("androidx.compose:compose-bom:$compose_bom")
// api composeBom
// androidTestApi composeBom

// Material Design 3
api 'androidx.compose.material3:material3'
api "androidx.compose.material3:material3:${project.ext.md3ComposeVersion}"

// Android Studio Preview support
api 'androidx.compose.ui:ui-tooling-preview'
debugApi 'androidx.compose.ui:ui-tooling'
api "androidx.compose.ui:ui-tooling-preview:$compose_version"
debugApi "androidx.compose.ui:ui-tooling:$compose_version"

// UI Tests
androidTestApi 'androidx.compose.ui:ui-test-junit4'
debugApi 'androidx.compose.ui:ui-test-manifest'
androidTestApi "androidx.compose.ui:ui-test-junit4:$compose_version"
debugApi "androidx.compose.ui:ui-test-manifest:$compose_version"

// Paging
api "androidx.paging:paging-compose:${project.ext.pagingComposeVersion}"
Expand All @@ -78,7 +79,7 @@ dependencies {
// Optional - Integration with ViewModels
api "androidx.lifecycle:lifecycle-viewmodel-compose:${project.ext.viewmodelComposeVersion}"
// Optional - Integration with LiveData
api 'androidx.compose.runtime:runtime-livedata'
api "androidx.compose.runtime:runtime-livedata:$compose_version"
// Optional - collectAsStateWithLifecycle
api "androidx.lifecycle:lifecycle-runtime-compose:${project.ext.lifecycyleComposeVersioin}"
// Optional - permissions
Expand Down
3 changes: 2 additions & 1 deletion devbricksx-compose/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
composeBomVersion = 2023.08.00
#composeBomVersion = 2023.08.00
md3ComposeVersion = 1.1.1
pagingComposeVersion = 3.2.0-rc01
activityComposeVersion = 1.7.2
viewmodelComposeVersion = 2.6.1
Expand Down

0 comments on commit 7e5bf1d

Please sign in to comment.