Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a separate versioning for COMPOSE_MATERIAL3_ADAPTIVE #1500

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions MULTIPLATFORM.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ Compose Multiplatform core libraries can be published to local Maven with the fo

`-Pjetbrains.publication.version.CORE_BUNDLE`,
`-Pjetbrains.publication.version.COMPOSE`,
`-Pjetbrains.publication.version.COMPOSE_MATERIAL3_ADAPTIVE`,
`-Pjetbrains.publication.version.LIFECYCLE`,
`-Pjetbrains.publication.version.NAVIGATION`,
`-Pjetbrains.publication.version.SAVEDSTATE`
`-Pjetbrains.publication.version.SAVEDSTATE`,
`-Pjetbrains.publication.version.WINDOW`,

The default value for the version is `0.0.0-SNAPSHOT`

And library groups:
`-Pjetbrains.publication.libraries=CORE_BUNDLE,COMPOSE,LIFECYCLE,NAVIGATION,SAVEDSTATE,WINDOW`
`-Pjetbrains.publication.libraries=CORE_BUNDLE,COMPOSE,COMPOSE_MATERIAL3_ADAPTIVE,LIFECYCLE,NAVIGATION,SAVEDSTATE,WINDOW`

The default value includes all libraries.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ abstract class LibraryVersionsService : BuildService<LibraryVersionsService.Para
val versions = getTable("versions")
val libsGroupsAndVersions = parameters.libsOverrideVersions.get()
versions.keySet().associateWith { versionName ->
val tagName = libsGroupsAndVersions.keys.firstOrNull { versionName.startsWith(it) }
val tagName = libsGroupsAndVersions.keys.firstOrNull { versionName == it }
val versionForTag = libsGroupsAndVersions[tagName]
val versionValue =
if (versionName.startsWith("COMPOSE") &&
Expand Down
4 changes: 2 additions & 2 deletions libraryversions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ CARDVIEW = { group = "androidx.cardview", atomicGroupVersion = "versions.CARDVIE
CAR_APP = { group = "androidx.car.app", atomicGroupVersion = "versions.CAR_APP" }
COLLECTION = { group = "androidx.collection", atomicGroupVersion = "versions.COLLECTION" }
COMPOSE_ANIMATION = { group = "org.jetbrains.compose.animation", atomicGroupVersion = "versions.COMPOSE" }
COMPOSE_COMPILER = { group = "org.jetbrains.compose.compiler", atomicGroupVersion = "versions.COMPOSE_COMPILER" }
COMPOSE_COMPILER = { group = "org.jetbrains.compose.compiler", atomicGroupVersion = "versions.COMPOSE" }
COMPOSE_DESKTOP = { group = "org.jetbrains.compose.desktop", atomicGroupVersion = "versions.COMPOSE" }
COMPOSE_FOUNDATION = { group = "org.jetbrains.compose.foundation", atomicGroupVersion = "versions.COMPOSE" }
COMPOSE_MATERIAL = { group = "org.jetbrains.compose.material", atomicGroupVersion = "versions.COMPOSE" }
COMPOSE_MATERIAL3 = { group = "org.jetbrains.compose.material3", atomicGroupVersion = "versions.COMPOSE_MATERIAL3" }
COMPOSE_MATERIAL3 = { group = "org.jetbrains.compose.material3", atomicGroupVersion = "versions.COMPOSE" }
COMPOSE_MATERIAL3_COMMON = { group = "org.jetbrains.compose.material3.common", atomicGroupVersion = "versions.COMPOSE_MATERIAL3_COMMON", overrideInclude = [ ":compose:material3:material3-common" ] }
COMPOSE_MATERIAL3_ADAPTIVE = { group = "org.jetbrains.compose.material3.adaptive", atomicGroupVersion = "versions.COMPOSE_MATERIAL3_ADAPTIVE" }
COMPOSE_RUNTIME = { group = "org.jetbrains.compose.runtime", atomicGroupVersion = "versions.COMPOSE" }
Expand Down
8 changes: 5 additions & 3 deletions mpp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ val libraryToComponents = mapOf(
ComposeComponent(":compose:material:material-icons-core"),
ComposeComponent(":compose:material:material-ripple"),
ComposeComponent(":compose:material3:material3-window-size-class"),
ComposeComponent(":compose:material3:adaptive:adaptive"),
ComposeComponent(":compose:material3:adaptive:adaptive-layout"),
ComposeComponent(":compose:material3:adaptive:adaptive-navigation"),
ComposeComponent(":compose:runtime:runtime", supportedPlatforms = ComposePlatforms.ALL),
ComposeComponent(":compose:runtime:runtime-saveable", supportedPlatforms = ComposePlatforms.ALL),
ComposeComponent(":compose:ui:ui"),
Expand Down Expand Up @@ -84,6 +81,11 @@ val libraryToComponents = mapOf(
ComposeComponent(":compose:ui:ui-unit"),
ComposeComponent(":compose:ui:ui-util"),
),
"COMPOSE_MATERIAL3_ADAPTIVE" to listOf(
ComposeComponent(":compose:material3:adaptive:adaptive"),
ComposeComponent(":compose:material3:adaptive:adaptive-layout"),
ComposeComponent(":compose:material3:adaptive:adaptive-navigation"),
),
"LIFECYCLE" to listOf(
ComposeComponent(
path = ":lifecycle:lifecycle-common",
Expand Down