Skip to content

Commit 982985f

Browse files
authored
Bump all dependencies to the latest, add Copilot instructions, and add new Material 3 components (Dialog, Divider, RadioButton, Segmented buttons, Slider, SnackbarHost, Tab, Chip, Select, TopAppBar, and more)
Bump all dependencies to the latest, add Copilot instructions, and add new Material 3 components (Dialog, Divider, RadioButton, Segmented buttons, Slider, SnackbarHost, Tab, Chip, Select, TopAppBar, and more)
2 parents 187255d + c22d2c6 commit 982985f

250 files changed

Lines changed: 8020 additions & 4605 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 328 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Copilot Setup Steps"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
pull_request:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
12+
jobs:
13+
copilot-setup-steps:
14+
runs-on: macos-latest
15+
16+
permissions:
17+
contents: read
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v5
22+
23+
- name: Set up JDK 17
24+
uses: actions/setup-java@v5
25+
with:
26+
java-version: "17"
27+
distribution: "temurin"
28+
29+
- name: Setup Gradle
30+
uses: gradle/actions/setup-gradle@v4

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See [Copilot instructions.md](.github/copilot-instructions.md).

README.md

Lines changed: 57 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -51,53 +51,76 @@ This project is still in development and has not reached a stable state. Some AP
5151

5252
#### Material 2 components
5353

54-
- `Button`
55-
- `Card`
56-
- `Checkbox`
57-
- `Divider` (not working properly on JS yet)
58-
- `Icon`
59-
- `IconButton`
60-
- `Snackbar` (inconsistent, not recommended), `SnackBarHost` (recommended)
61-
- `Switch`
62-
- `Text`
54+
**Deprecation notice:** The Material 2 components are no longer maintained and published for release since v0.6.0, due to its decreasing popularity and the underlying KMDC library's incompatible Kotlin and Compose versions.
55+
56+
- Button: `Button`
57+
- Card: `Card`
58+
- Checkbox: `Checkbox`
59+
- Divider: `Divider` (not working properly on JS yet)
60+
- Icon: `Icon`
61+
- Icon button: `IconButton`
62+
- Snackbar: `Snackbar` (inconsistent, not recommended), `SnackBarHost` (recommended)
63+
- Switch: `Switch`
64+
- Text: `Text`
6365

6466
##### `ext` components
6567

66-
- `Button`
67-
- `IconButton`
68-
- `RadioRow`, `RadioGroupRow`
69-
- `SwitchWithLabel`
70-
- `MaterialText`, `TaglessText`
71-
- `TextField`, `OutlinedTextField`
72-
- `TopAppBarScaffold`
68+
- Button: `Button`
69+
- Icon button: `IconButton`
70+
- Radio button: `RadioRow`, `RadioGroupRow`
71+
- Switch: `SwitchWithLabel`
72+
- Text: `MaterialText`, `TaglessText`
73+
- Text field: `TextField`, `OutlinedTextField`
74+
- Top app bar: `TopAppBarScaffold`
7375

7476
##### `lazy.ext` components
7577

7678
- `List`/`LazyColumnList` (visually inconsistent for now)
7779

7880
#### Material 3 components
7981

80-
- `Button` (`FilledButton`), `ElevatedButton`, `FilledTonalButton`, `OutlinedButton`, `TextButton`
81-
- `Card` (`FilledCard`), `ElevatedCard`, `OutlinedCard`
82-
- `Checkbox`
83-
- `FloatingActionButton`, `SmallFloatingActionButton`, `LargeFloatingActionButton`, `ExtendedFloatingActionButton`
84-
- `Icon`
85-
- `IconButton`, `IconToggleButton`, `FilledIconButton`, `FilledIconToggleButton`, `FilledTonalIconButton`, `FilledTonalIconToggleButton`, `OutlinedIconButton`, `OutlinedIconToggleButton`
86-
- `LinearProgressIndicator`, `CircularProgressIndicator`
87-
- `Switch`
88-
- `Text`
82+
- Button: `Button` (`FilledButton`), `ElevatedButton`, `FilledTonalButton`, `OutlinedButton`, `TextButton`
83+
- Card: `Card` (`FilledCard`), `ElevatedCard`, `OutlinedCard`
84+
- Checkbox: `Checkbox`
85+
- Dialog: `AlertDialog`, `SimpleDialog`
86+
- Divider: `HorizontalDivider`
87+
- Floating action button: `FloatingActionButton`, `SmallFloatingActionButton`, `LargeFloatingActionButton`,
88+
`ExtendedFloatingActionButton`
89+
- Icon: `Icon`
90+
- Icon button: `IconButton`, `IconToggleButton`, `FilledIconButton`, `FilledIconToggleButton`, `FilledTonalIconButton`,
91+
`FilledTonalIconToggleButton`, `OutlinedIconButton`, `OutlinedIconToggleButton`
92+
- Navigation drawer: `ModalNavigationDrawer` (deprecated)
93+
- Progress indicator: `LinearProgressIndicator`, `CircularProgressIndicator`
94+
- Radio button: `RadioButton`
95+
- Segmented button: `SingleChoiceSegmentedButtonRow`, `MultiChoiceSegmentedButtonRow`
96+
- Slider: `Slider`, `RangeSlider`
97+
- Snackbar: `SnackbarHost`, `SnackbarHostState`
98+
- Switch: `Switch`
99+
- Tab: `PrimaryTabRow`, `SecondaryTabRow` (tabs are in `ext`)
100+
- Text: `Text`
89101

90102
##### `ext` components
91103

92-
- `Button` (`FilledButton`), `ElevatedButton`, `FilledTonalButton`, `OutlinedButton`, `TextButton`
93-
- `Card` (`FilledCard`), `ElevatedCard`, `OutlinedCard`
94-
- `DropdownMenu`, `DropdownMenuItem`
95-
- `ExposedDropdownMenuBox`, `ExposedDropdownMenuBoxScope.ExposedDropdownMenuBoxTextField`, `ExposedDropdownMenuBoxScope.ExposedDropdownMenu`, `ExposedDropdownMenuWithTextField`
96-
- `FloatingActionButton`, `SmallFloatingActionButton`, `LargeFloatingActionButton`, `ExtendedFloatingActionButton`
97-
- `IconButton`, `IconToggleButton`, `FilledIconButton`, `FilledIconToggleButton`, `FilledTonalIconButton`, `FilledTonalIconToggleButton`, `OutlinedIconButton`, `OutlinedIconToggleButton`
98-
- `NavigationBar`, `NavigationBarItem`
99-
- `MaterialText`, `TaglessText`
100-
- `TextField`, `OutlinedTextField`
104+
- Badge: `Badge` (deprecated)
105+
- Button: `Button` (`FilledButton`), `ElevatedButton`, `FilledTonalButton`, `OutlinedButton`, `TextButton`
106+
- Card: `Card` (`FilledCard`), `ElevatedCard`, `OutlinedCard`
107+
- Chip: `AssistChip`, `ElevatedAssistChip`, `FilterChip`, `ElevatedFilterChip`, `InputChip`, `SuggestionChip`,
108+
`ElevatedSuggestionChip`
109+
- Dropdown menu: `DropdownMenu`, `DropdownMenuItem`
110+
- `ExposedDropdownMenuBox`, `ExposedDropdownMenuBoxScope.ExposedDropdownMenuBoxTextField`, `ExposedDropdownMenuBoxScope.ExposedDropdownMenu`, `ExposedDropdownMenuBoxWithTextField`
111+
- Floating action button: `FloatingActionButton`, `SmallFloatingActionButton`, `LargeFloatingActionButton`,
112+
`ExtendedFloatingActionButton`
113+
- Icon button: `IconButton`, `IconToggleButton`, `FilledIconButton`, `FilledIconToggleButton`, `FilledTonalIconButton`,
114+
`FilledTonalIconToggleButton`, `OutlinedIconButton`, `OutlinedIconToggleButton`
115+
- Navigation bar: `NavigationBar`, `NavigationBarItem`
116+
- Radio button: `RadioButtonRow`, `radioGroup`
117+
- Segmented button: `SingleChoiceSegmentedButtonRowScope.SegmentedButton`,
118+
`MultiChoiceSegmentedButtonRowScope.SegmentedButton`
119+
- Select: `FilledSelect`, `OutlinedSelect`, `SelectOption`
120+
- Tab: `PrimaryTab`, `SecondaryTab`
121+
- Text: `MaterialText`, `TaglessText`
122+
- Text field: `TextField`, `OutlinedTextField`
123+
- Top app bar: `TopAppBar`, `CenterAlignedTopAppBar`, `MediumTopAppBar`, `LargeTopAppBar`
101124

102125
##### `lazy.ext` components
103126

@@ -184,15 +207,6 @@ kotlin {
184207

185208
View [all the artifacts on Maven Central](https://search.maven.org/search?q=g:com.huanshankeji%20AND%20a:compose-multiplatform-*).
186209

187-
This project depends on [Kobweb](https://github.com/varabyte/kobweb) which is not published to Maven Central yet, so you have to add the following Maven repository:
188-
189-
```kotlin
190-
repositories {
191-
mavenCentral()
192-
maven("https://us-central1-maven.pkg.dev/varabyte-repos/public")
193-
}
194-
```
195-
196210
### Material Symbols & Icons on JS
197211

198212
See [the corresponding section in Compose HTML Material](https://github.com/huanshankeji/compose-html-material?tab=readme-ov-file#material-symbols--icons) for configuring Material Icons on JS.

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ tasks.wrapper {
33
}
44

55
plugins {
6-
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3"
6+
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.18.1"
77
}
88

99
apiValidation {
@@ -13,6 +13,6 @@ apiValidation {
1313
}
1414

1515
ignoredProjects += "compose-multiplatform-html-unified".let {
16-
listOf("$it-demo", "$it-common-legacy")
16+
listOf("$it-demo")
1717
}
1818
}

buildSrc/build.gradle.kts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ plugins {
33
}
44

55
repositories {
6-
//mavenLocal() // comment out when not needed
6+
mavenLocal() // TODO comment out when not needed so the build is always reproducible by others
77
gradlePluginPortal()
88
google()
99
mavenCentral()
1010
}
1111

1212
dependencies {
13-
val kotlinVersion = "2.2.0-RC2"
13+
val kotlinVersion = "2.3.20"
1414
implementation(kotlin("gradle-plugin", kotlinVersion))
1515
implementation("org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion")
16-
implementation("org.jetbrains.compose:compose-gradle-plugin:1.8.1")
17-
implementation("com.huanshankeji.team:gradle-plugins:0.9.0") // don't use a snapshot version in a main branch
18-
implementation("com.android.tools.build:gradle:8.10.1")
19-
implementation("com.huanshankeji:common-gradle-dependencies:0.9.0-20241203") // don't use a snapshot version in a main branch
16+
implementation("org.jetbrains.compose:compose-gradle-plugin:1.10.3")
17+
implementation("com.huanshankeji.team:gradle-plugins:0.11.0") // don't use a snapshot version in a main branch
18+
// https://developer.android.com/build/releases/gradle-plugin, https://mvnrepository.com/artifact/com.android.tools.build/gradle
19+
implementation("com.android.tools.build:gradle:8.12.3")
20+
implementation("com.huanshankeji:common-gradle-dependencies:0.10.0-20251024") // don't use a snapshot version in a main branch
2021
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
val androidSdkVersion = 35
1+
val androidSdkVersion = 36

buildSrc/src/main/kotlin/VersionsAndDependencies.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@ val commonDependencies = CommonDependencies()
88
object DependencyVersions {
99
const val composeMultiplatform = ComposeBuildConfig.composeVersion // for "ui-unit"
1010

11+
1112
// https://slack-chats.kotlinlang.org/t/27579160/after-updating-to-1-8-0-rc01-package-androidx-compose-materi
1213
// https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.8.0-rc01
1314
const val composeMultiplatformMaterialIconsExtended = "1.7.3"
14-
val kobweb = "0.19.2"
15-
val huanshankejiComposeHtml = "0.4.0" // don't use a snapshot version in a main branch
15+
16+
// https://github.com/varabyte/kobweb/releases
17+
val kobweb = "0.24.0"
18+
val huanshankejiComposeHtml = "0.5.0" // don't use a snapshot version in a main branch
19+
20+
// https://github.com/mpetuska/kmdc/releases
1621
val kmdc = "0.1.2"
17-
val materialSymbols = "0.25.1"
22+
23+
// https://github.com/marella/material-symbols/releases
24+
val materialSymbols = "0.42.3"
1825
}

buildSrc/src/main/kotlin/common-conventions.gradle.kts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ plugins {
88
}
99

1010
repositories {
11-
//mavenLocal() // commented out so the build is always reproducible by others // put back if needed when depending on a snapshot
11+
mavenLocal() // TODO comment out when not needed so the build is always reproducible by others
1212
mavenCentral()
1313
google()
14-
maven("https://us-central1-maven.pkg.dev/varabyte-repos/public") // for Kobweb
1514
}
1615

1716
group = "com.huanshankeji"
@@ -25,7 +24,6 @@ kotlin {
2524

2625
//androidTarget()
2726

28-
iosX64()
2927
iosArm64()
3028
iosSimulatorArm64()
3129

@@ -40,6 +38,10 @@ kotlin {
4038
js {
4139
// The project works without this, but it can be added to avoid potential issues.
4240
browser()
41+
42+
compilerOptions {
43+
target.set("es2015")
44+
}
4345
}
4446

4547

@@ -60,5 +62,6 @@ kotlin {
6062

6163
compilerOptions {
6264
freeCompilerArgs.add("-Xexpect-actual-classes")
65+
optIn.add("com.huanshankeji.compose.ExperimentalApi")
6366
}
6467
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
plugins {
22
id("lib-conventions-without-publishing")
3-
id("com.huanshankeji.kotlin-multiplatform-sonatype-ossrh-publish-conventions")
3+
id("com.huanshankeji.maven-central-publish-conventions")
44
}

0 commit comments

Comments
 (0)