Skip to content

Commit

Permalink
Publish wasm target
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed Aug 9, 2023
1 parent dc901fa commit 3e23191
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ jobs:
java-version: 20
- uses: gradle/gradle-build-action@v2
with:
arguments: :colormath:check :extensions:colormath-ext-jetpack-compose:check :extensions:colormath-ext-android-colorint:check :extensions:colormath-ext-android-color:check --stacktrace
arguments: |
:colormath:jsNodeTest
:colormath:jvmTest
:colormath:linuxX64Test
:extensions:colormath-ext-jetpack-compose:check
:extensions:colormath-ext-android-colorint:check
:extensions:colormath-ext-android-color:check
--stacktrace
- name: Bundle the build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip
Expand All @@ -39,7 +46,15 @@ jobs:
java-version: 20
- uses: gradle/gradle-build-action@v2
with:
arguments: macosX64Test :colormath:compileKotlinMacosArm64 iosX64Test tvosX64Test iosSimulatorArm64Test tvosSimulatorArm64Test watchosSimulatorArm64Test --stacktrace
arguments: |
macosX64Test
:colormath:compileKotlinMacosArm64
iosX64Test
tvosX64Test
iosSimulatorArm64Test
tvosSimulatorArm64Test
watchosSimulatorArm64Test
--stacktrace
windows-tests:
runs-on: windows-latest
steps:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ jobs:
java-version: 20
- uses: gradle/gradle-build-action@v2
with:
arguments: :colormath:check :extensions:colormath-ext-jetpack-compose:check :extensions:colormath-ext-android-colorint:check :extensions:colormath-ext-android-color:check --stacktrace
arguments: |
:colormath:jsNodeTest
:colormath:jvmTest
:colormath:linuxX64Test
:extensions:colormath-ext-jetpack-compose:check
:extensions:colormath-ext-android-colorint:check
:extensions:colormath-ext-android-color:check --stacktrace
- name: Bundle the build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

## Unreleased
### Added
- Publish `wasm` target. This target is experimental and is not tested on CI.

## Changed
- Updated Kotlin to 1.9.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dependencies {

Colormath supports the following targets: `jvm`, `mingwX64`, `linuxX64`, `macosX64`, `ios`,
`watchos`, `tvos`, and `js` (for both NodeJS and Browsers). You'll need to use Gradle 6 or newer.
Artifacts for `macosArm64` are also published, but not tested with CI.
Artifacts for `macosArm64` and `wasm` are also published, but not tested with CI.

#### Snapshots

Expand Down
19 changes: 9 additions & 10 deletions colormath/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
@file:Suppress("PropertyName")

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl

plugins {
kotlin("multiplatform")
Expand All @@ -15,10 +11,14 @@ repositories {

kotlin {
jvm()
js(IR) {
js {
nodejs()
browser()
}
@OptIn(ExperimentalWasmDsl::class)
wasm {
browser()
}

linuxX64()
mingwX64()
Expand Down Expand Up @@ -50,10 +50,9 @@ kotlin {
"tvosSimulatorArm64",
"watchos",
"watchosSimulatorArm64"
)
.forEach { target ->
getByName(target + "Main").dependsOn(nativeMain)
}
).forEach { target ->
getByName(target + "Main").dependsOn(nativeMain)
}

val commonTest by getting {
dependencies {
Expand Down

0 comments on commit 3e23191

Please sign in to comment.