Skip to content

Commit

Permalink
Fix CI and docs build
Browse files Browse the repository at this point in the history
Tweaks after #228
  • Loading branch information
chrisbanes committed Jun 16, 2024
1 parent 34ea93f commit 0b54163
Show file tree
Hide file tree
Showing 15 changed files with 3,536 additions and 27 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,23 @@ jobs:
- uses: gradle/gradle-build-action@v3

- run: ./gradlew :dokkaHtmlMultiModule sample:web-wasm:wasmJsBrowserDistribution --no-configuration-cache
- run: |
./gradlew --no-configuration-cache \
:dokkaHtmlMultiModule \
:sample:web:wasmJsBrowserDistribution \
:sample:web:jsBrowserDistribution
- name: Build site
run: mkdocs build

- name: Copy Dokka output to site
run: cp -r build/dokka/htmlMultiModule/ site/api/

- name: Copy WebAssembly sample to site
run: cp -r sample/web-wasm/build/dist/wasmJs/productionExecutable/ site/wasmsample/
- name: Copy web samples site
run: |
mkdir -p site/sample
cp -r sample/web/build/dist/wasmJs/productionExecutable/ site/sample/wasm/
cp -r sample/web/build/dist/js/productionExecutable/ site/sample/js/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ captures
.idea/tasks.xml
.idea/modules.xml
.idea/compiler.xml
.idea/other.xml
.idea/jarRepositories.xml
.idea/deploymentTargetDropDown.xml
.idea/deploymentTargetSelector.xml
Expand Down
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class MetalavaConventionPlugin : Plugin<Project> {
.flatMap { it.kotlin.sourceDirectories },
)
}

tasks.named { it.startsWith("metalavaCheckCompatibility") }.configureEach {
dependsOn(tasks.named { it.startsWith("generateResourceAccessors") })
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ agp = "8.5.0"
androidx-benchmark = "1.2.4"
androidx-test-ext-junit = "1.1.5"
coil = "3.0.0-alpha06"
compose-multiplatform = "1.6.10"
compose-multiplatform = "1.6.11"
kotlinx-coroutines-swing = "1.8.1"
ktlint = "1.0.1"
kotlin = "1.9.23"
kotlin = "1.9.24"
ktor = "3.0.0-wasm2"
metalava = "0.3.5"
robolectric = "4.12.2"
Expand Down Expand Up @@ -40,6 +41,7 @@ androidx-test-uiautomator = "androidx.test.uiautomator:uiautomator:2.3.0"
coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil" }
coil-ktor = { module = "io.coil-kt.coil3:coil-network-ktor", version.ref = "coil" }

kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines-swing" }
ktor-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }

Expand Down
1 change: 1 addition & 0 deletions haze/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ kotlin {
named("wasmJsMain") {
dependsOn(skikoMain)
}

named("jsMain") {
dependsOn(skikoMain)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ fun ScreenshotTheme(
}
}

@Composable
fun poppinsFontFamily(): FontFamily = FontFamily(Font(Res.font.poppins_regular))
val FontFamily.Companion.Poppins: FontFamily
@Composable get() = FontFamily(Font(Res.font.poppins_regular))

private val Typography: Typography
@Composable get() {
// Eugh, this is gross but there is no defaultFontFamily property in M3
val default = Typography()
val fontFamily = poppinsFontFamily()
val fontFamily = FontFamily.Poppins
return Typography(
displayLarge = default.displayLarge.copy(fontFamily = fontFamily),
displayMedium = default.displayMedium.copy(fontFamily = fontFamily),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2024, Christopher Banes and the Haze project contributors
// SPDX-License-Identifier: Apache-2.0

package dev.chrisbanes.haze.test

actual abstract class ScreenshotTest

actual fun ScreenshotTest.runScreenshotTest(
block: ScreenshotUiTest.() -> Unit,
) {
// no-op
}
Loading

0 comments on commit 0b54163

Please sign in to comment.