Skip to content

Commit 0fe73f1

Browse files
committed
chore: Release version 1.0.0 with documentation and ABI validation
- Updated project version to `1.0.0` in `gradle.properties`. - Integrated Dokka plugin and configured API documentation generation across all modules. - Enabled Binary Compatibility Validator for `theme-material`, `theme-material3`, and `theme-prefs` modules. - Renamed `darkThemeState` to `themeState` across the project for better clarity and consistency. - Added comprehensive KDoc documentation to public Composable functions and classes. - Updated dependencies: AGP `9.0.1`, Kotlin `2.3.10`, and `androidx-activity-compose` `1.12.4`. - Enhanced GitHub Actions: - Added `checkLegacyAbi` to the build workflow. - Updated Pages workflow to assemble a site containing both the WasmJS demo and Dokka documentation. - Added a `CHANGELOG.md` documenting project history and a landing page for GitHub Pages. - Fixed a parameter naming inconsistency in `RadioDialogContent`.
1 parent 056555f commit 0fe73f1

31 files changed

Lines changed: 903 additions & 58 deletions

File tree

.github/pages-assets/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>MaterialThemePrefs</title>
7+
<style>
8+
body { font-family: system-ui, sans-serif; max-width: 640px; margin: 2rem auto; padding: 0 1rem; line-height: 1.5; }
9+
h1 { font-size: 1.5rem; }
10+
p { color: #444; }
11+
ul { list-style: none; padding: 0; }
12+
li { margin: 0.75rem 0; }
13+
a { color: #0969da; text-decoration: none; }
14+
a:hover { text-decoration: underline; }
15+
</style>
16+
</head>
17+
<body>
18+
<h1>MaterialThemePrefs</h1>
19+
<p>Kotlin Multiplatform library for persistent light/dark/system theme preference with Compose Multiplatform (Material and Material 3).</p>
20+
<ul>
21+
<li><a href="./docs/">API Documentation</a></li>
22+
<li><a href="./demo/">Web Demo</a></li>
23+
</ul>
24+
</body>
25+
</html>

.github/workflows/build_only.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
env:
3131
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
3232
- name: Build
33-
run: ./gradlew build
33+
run: ./gradlew build checkLegacyAbi

.github/workflows/gh-pages.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# GitHub Pages: single artifact with / (landing), /docs/ (Dokka), /demo/ (Wasm).
2+
# In repo Settings > Pages > Build and deployment, set Source to "GitHub Actions".
13
name: Build & Deploy CI/CD
24

35
on:
46
push:
5-
branches: ["master", "dev"]
7+
branches: ["master", "dev", "dokka"]
68

79
# Allows you to run this workflow manually from the Actions tab
810
workflow_dispatch:
@@ -37,19 +39,29 @@ jobs:
3739
cache-overwrite-existing: true
3840
- name: "Build WasmJS App"
3941
run: gradle --no-configure-on-demand :sample:web:wasmJsBrowserDistribution
42+
- name: "Build Dokka"
43+
run: gradle --no-configure-on-demand :dokkaGenerate
44+
- name: "Assemble site"
45+
run: |
46+
mkdir -p build/site/demo
47+
cp .github/pages-assets/index.html build/site/index.html
48+
cp -r sample/web/build/dist/wasmJs/productionExecutable/* build/site/demo/
4049
- name: Setup Pages
4150
uses: actions/configure-pages@v5
4251
- name: Upload artifact
4352
uses: actions/upload-pages-artifact@v3
4453
with:
45-
path: ./sample/web/build/dist/wasmJs/productionExecutable
54+
path: ./build/site
4655

4756
deploy:
4857
environment:
4958
name: github-pages
5059
url: ${{ steps.deployment.outputs.page_url }}
5160
runs-on: ubuntu-latest
5261
needs: build
62+
permissions:
63+
pages: write
64+
id-token: write
5365
steps:
5466
- name: Deploy to GitHub Pages
5567
id: deployment

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Supported platforms:
1010
- Desktop JVM (MacOS, Linux, Windows)
1111
- Web (wasm JS)
1212

13+
**[API Documentation](https://softartdev.github.io/MaterialThemePrefs/docs/)** · **[Web Demo](https://softartdev.github.io/MaterialThemePrefs/demo/)**
14+
1315
![Android screenshot](doc/screenshots/gif/android/material_design_3/demo.gif)
1416
![iOS screenshot](doc/screenshots/gif/iOS/material_design_3/demo.gif)
1517
![Desktop screenshot](doc/screenshots/gif/desktop/material_design_3/demo.gif)

build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,17 @@ plugins {
55
alias(libs.plugins.android.application) apply false
66
alias(libs.plugins.android.kotlin.multiplatform.library) apply false
77
alias(libs.plugins.compose.multiplatform) apply false
8+
alias(libs.plugins.dokka)
9+
}
10+
11+
dependencies {
12+
dokka(project(":theme:theme-prefs"))
13+
dokka(project(":theme:theme-material"))
14+
dokka(project(":theme:theme-material3"))
15+
}
16+
17+
dokka {
18+
dokkaPublications.html {
19+
outputDirectory.set(layout.buildDirectory.dir("site/docs"))
20+
}
821
}

0 commit comments

Comments
 (0)