Skip to content

Commit e351aa4

Browse files
authored
Merge pull request #9 from Konyaco/dev
Dev
2 parents 66df10a + d387a26 commit e351aa4

8 files changed

Lines changed: 275 additions & 75 deletions

File tree

.github/workflows/gradle-publish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
66
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
77

8-
name: Gradle Package
8+
name: Gradle Publish
99

1010
on:
1111
release:
@@ -34,10 +34,13 @@ jobs:
3434
with:
3535
arguments: build
3636

37-
- name: Publish to mavenpackage
37+
- name: Publish to Maven Central
3838
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
3939
with:
4040
arguments: publish
4141
env:
42-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
43-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
42+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
43+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
44+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
45+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
46+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}

README.md

Lines changed: 95 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,123 @@
11
# Compose Fluent
22

3-
[![License](https://img.shields.io/github/license/Konyaco/compose-fluent-ui)](https://github.com/Konyaco/compose-fluent-ui/blob/master/LICENSE)
3+
[![License](https://img.shields.io/github/license/Konyaco/compose-fluent-ui)](LICENSE)
44
[![Version](https://img.shields.io/github/v/release/Konyaco/compose-fluent-ui?include_prereleases)](https://github.com/Konyaco/compose-fluent-ui/releases)
5+
![Maven Central](https://img.shields.io/maven-central/v/com.konyaco/fluent)
56

6-
**Fluent Design** UI library for **Jetbrains Compose**
7+
8+
**Fluent Design** UI library for **Compose Multiplatform**
79

810
![Example](assets/screenshot.png)
911

1012
## Current Status
1113

12-
> This library is experimental, any API (even the package name) would be changed in the future without any notification.
14+
> This library is experimental, any API would be changed in the future without any notification.
1315
14-
Current version: `v0.0.1-dev3`
16+
Please note that there are lots of hard-coding and workarounds in our source code, which we plan to eliminate in the future.
1517

16-
Now supported:
18+
Thank you for using our library. We look forward to receiving your feedback and contributions!
1719

18-
- Coarse implementation of some basic components: `Button`, `Switcher`, `TextField`, `Slider`...
19-
- A fake `Mica` and `Layer`
20-
- Dark theme and light theme
2120

22-
There are lots of hard-code and workaround in our source code, we are going to eliminate them in the future
21+
## Quick Start
2322

24-
Thank you for using our library, and we look forward to your feedback and contributions!
23+
### Add Dependency
2524

26-
### Multiplatform
25+
```kts
26+
implementation("com.konyaco:fluent:0.0.1-dev4")
27+
implementation("com.konyaco:fluent-icons-extended:0.0.1-dev4") // If you want to use full fluent icons.
28+
```
2729

28-
Currently, only Desktop platforms are supported. It might be easy to migrate to multiplatform.
30+
### Example
2931

30-
## How to Use
32+
```kotlin
33+
import com.konyaco.fluent.component.*
3134

32-
We are not yet published our library to maven. You can download the source code or jar in release page
35+
@Composable
36+
fun App() {
37+
FluentTheme {
38+
Mica(Modifier.fillMaxSize()) {
39+
Column(Modifier.padding(24.dp)) {
40+
Button(onClick = {}) {
41+
Text("Hello Fluent Design")
42+
}
43+
}
44+
}
45+
}
46+
}
47+
```
48+
See [`example`](example) module for more details.
3349

34-
- `FluentTheme()` is the context and entry point of the application.
50+
- `FluentTheme()` is the context and entry point of the application, just like `MaterialTheme`
3551
- Components are under `component` package
3652
- `Mica` and `Layer` are under `background` package
3753

38-
About the API usage, just see `Main.kt`
39-
4054
## License
4155

4256
This library is under Apache-2.0 license.
4357

4458
The copyright of the icon assets (in `com.konyaco.fluent.icons` package) belongs to Microsoft.
4559

46-
## TODO
47-
48-
- M1
49-
- [ ] Basic Inputs
50-
- [x] Button
51-
- [x] Toggle Switch
52-
- [x] Checkbox
53-
- [x] Radio Button
54-
- [x] Slider
55-
- [ ] Dropdown
56-
- [ ] Pill Button
57-
- [x] Layers
58-
- [x] Fake Mica
59-
- [x] Simple Layer
60-
- [x] Text Field
61-
- [x] Part of Animation
62-
- M2
63-
- [ ] Theme
64-
- [x] Light and Dark theme
65-
- [ ] Custom Accent color
66-
- [ ] Animation
67-
- [ ] Refactor architecture, cleanup code, eliminate hard-code
68-
- [ ] More
69-
- M3
70-
- [ ] Compound components (Side Nav, Top Nav, Tab View, etc...)
71-
- [ ] Layer (Might be delayed)
72-
- [ ] Real Mica
73-
- [ ] Acrylic
74-
- [ ] Accessibility Semantics
60+
## Components
61+
62+
### Layers
63+
64+
- Mica
65+
- [x] Simple Mica
66+
- [ ] Real Mica
67+
- Layer
68+
- [x] Simple Layer
69+
- [ ] Real Layer
70+
- [ ] Acrylic
71+
72+
### Basic Inputs
73+
74+
- [x] Button
75+
- [x] ToggleSwitch
76+
- [x] CheckBox
77+
- [x] RadioButton
78+
- [x] Slider
79+
- [x] DropdownMenu
80+
- [x] TextField
81+
- [x] ProgressBar
82+
- [x] ProgressRing
83+
- [ ] Pill Button
84+
- [ ] ComboBox
85+
- [ ] RatingControl
86+
87+
### Basic Components
88+
89+
- [ ] Tooltip
90+
- [ ] InfoBar
91+
- [ ] FilePicker
92+
- [ ] Menu
93+
94+
### Dialogs
95+
96+
- [x] Simple Dialog
97+
- [ ] Compound Dialog (Title, Content, Controls)
98+
- [ ] Flyout
99+
100+
### Animations
101+
102+
- [x] Animation Preset Constants (Duration, Easing Functions)
103+
104+
### Theme
105+
106+
- [x] Light and Dark theme
107+
- [ ] Custom accent color
108+
109+
### Compound Components
110+
111+
- [ ] Color Picker
112+
- [ ] DateTime Picker
113+
- [ ] Calender
114+
- [ ] Navigation
115+
- [ ] NavigationView
116+
- [ ] BreadcrumbBar
117+
- [ ] Pivot
118+
- [ ] TabView
119+
120+
### TODO
121+
122+
123+
- [ ] Accessibility Semantics

assets/screenshot.png

73.1 KB
Loading

example/common/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kotlin {
1010
sourceSets {
1111
val commonMain by getting {
1212
dependencies {
13-
api(project(":fluent"))
13+
api("com.konyaco:fluent:0.0.1-dev4")
1414
}
1515
}
1616
val commonTest by getting
@@ -33,4 +33,4 @@ android {
3333
sourceCompatibility = JavaVersion.VERSION_11
3434
targetCompatibility = JavaVersion.VERSION_11
3535
}
36-
}
36+
}

fluent-icons-core/build.gradle.kts

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ plugins {
33
id("org.jetbrains.compose")
44
id("com.android.library")
55
id("maven-publish")
6+
signing
67
}
78

89
group = "com.konyaco"
910
version = "0.0.1-dev4"
1011

1112
kotlin {
1213
jvm()
13-
android()
14+
android {
15+
publishLibraryVariants("release")
16+
}
1417
sourceSets {
1518
val commonMain by getting {
1619
dependencies {
@@ -39,3 +42,63 @@ android {
3942
targetCompatibility = JavaVersion.VERSION_11
4043
}
4144
}
45+
46+
val javadocJar by tasks.registering(Jar::class) {
47+
archiveClassifier.set("javadoc")
48+
}
49+
50+
publishing {
51+
publications.withType<MavenPublication> {
52+
artifact(javadocJar.get())
53+
pom {
54+
name.set("compose-fluent-ui")
55+
description.set("A Fluent Design UI library for compose-multiplatform.")
56+
url.set("https://github.com/Konyaco/compose-fluent-ui")
57+
58+
licenses {
59+
license {
60+
name.set("The Apache License, Version 2.0")
61+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
62+
}
63+
}
64+
65+
developers {
66+
developer {
67+
name.set("Kon Yaco")
68+
email.set("atwzj233@gmail.com")
69+
url.set("https://github.com/Konyaco")
70+
}
71+
}
72+
73+
scm {
74+
url.set("https://github.com/Konyaco/compose-fluent-ui")
75+
connection.set("scm:git:git://github.com/Konyaco/compose-fluent-ui.git")
76+
developerConnection.set("scm:git:ssh://github.com/Konyaco/compose-fluent-ui.git")
77+
}
78+
}
79+
}
80+
repositories {
81+
maven {
82+
val releasesUrl ="https://s01.oss.sonatype.org/content/repositories/snapshots/"
83+
val snapshotsUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
84+
name = "OSSRH"
85+
url = uri(
86+
if (version.toString().endsWith("SNAPSHOT")) releasesUrl
87+
else snapshotsUrl
88+
)
89+
credentials {
90+
username = System.getenv("OSSRH_USERNAME")
91+
password = System.getenv("OSSRH_PASSWORD")
92+
}
93+
}
94+
}
95+
}
96+
97+
signing {
98+
useInMemoryPgpKeys(
99+
System.getenv("SIGNING_KEY_ID"),
100+
System.getenv("SIGNING_KEY"),
101+
System.getenv("SIGNING_PASSWORD")
102+
)
103+
sign(publishing.publications)
104+
}

fluent-icons-extended/build.gradle.kts

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ plugins {
33
id("org.jetbrains.compose")
44
id("com.android.library")
55
id("maven-publish")
6+
signing
67
}
78

89
group = "com.konyaco"
910
version = "0.0.1-dev4"
1011

1112
kotlin {
1213
jvm()
13-
android()
14+
android {
15+
publishLibraryVariants("release")
16+
}
1417
sourceSets {
1518
val commonMain by getting {
1619
dependencies {
@@ -42,23 +45,62 @@ android {
4245
}
4346
}
4447

48+
val javadocJar by tasks.registering(Jar::class) {
49+
archiveClassifier.set("javadoc")
50+
}
51+
4552
publishing {
46-
repositories {
47-
maven {
48-
name = "OSSRHSnapshot"
49-
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
50-
credentials {
51-
username = System.getenv("MAVEN_USERNAME")
52-
password = System.getenv("MAVEN_PASSWORD")
53+
publications.withType<MavenPublication> {
54+
artifact(javadocJar.get())
55+
pom {
56+
name.set("compose-fluent-ui")
57+
description.set("A Fluent Design UI library for compose-multiplatform.")
58+
url.set("https://github.com/Konyaco/compose-fluent-ui")
59+
60+
licenses {
61+
license {
62+
name.set("The Apache License, Version 2.0")
63+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
64+
}
65+
}
66+
67+
developers {
68+
developer {
69+
name.set("Kon Yaco")
70+
email.set("atwzj233@gmail.com")
71+
url.set("https://github.com/Konyaco")
72+
}
73+
}
74+
75+
scm {
76+
url.set("https://github.com/Konyaco/compose-fluent-ui")
77+
connection.set("scm:git:git://github.com/Konyaco/compose-fluent-ui.git")
78+
developerConnection.set("scm:git:ssh://github.com/Konyaco/compose-fluent-ui.git")
5379
}
5480
}
81+
}
82+
repositories {
5583
maven {
84+
val releasesUrl ="https://s01.oss.sonatype.org/content/repositories/snapshots/"
85+
val snapshotsUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
5686
name = "OSSRH"
57-
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
87+
url = uri(
88+
if (version.toString().endsWith("SNAPSHOT")) releasesUrl
89+
else snapshotsUrl
90+
)
5891
credentials {
59-
username = System.getenv("MAVEN_USERNAME")
60-
password = System.getenv("MAVEN_PASSWORD")
92+
username = System.getenv("OSSRH_USERNAME")
93+
password = System.getenv("OSSRH_PASSWORD")
6194
}
6295
}
6396
}
6497
}
98+
99+
signing {
100+
useInMemoryPgpKeys(
101+
System.getenv("SIGNING_KEY_ID"),
102+
System.getenv("SIGNING_KEY"),
103+
System.getenv("SIGNING_PASSWORD")
104+
)
105+
sign(publishing.publications)
106+
}

0 commit comments

Comments
 (0)