Skip to content

Commit

Permalink
Add wasm and linuxArm targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed Apr 27, 2024
1 parent 21d46cd commit 3f0877a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ dependencies {

#### Multiplatform

Clikt supports the following targets: `jvm`, `mingwX64`, `linuxX64`, `macosX64`, `macosArm64'`,
and `js` (for both Node.js and Browsers). [See the
Clikt supports the following targets: `jvm`, `mingwX64`, `linuxX64`, `linuxArm64`, `macosX64`, `macosArm64'`,
and `js` and `wasmJs` (for both Node.js and Browsers). [See the
docs](https://ajalt.github.io/clikt/advanced/#multiplatform-support) for more information about
functionality supported on each target. You'll need to use Gradle 6 or newer.

Expand Down
8 changes: 8 additions & 0 deletions clikt/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")

import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl


plugins {
kotlin("multiplatform")
alias(libs.plugins.publish)
Expand All @@ -11,8 +14,13 @@ kotlin {
nodejs()
browser()
}
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
nodejs()
}

linuxX64()
linuxArm64()
mingwX64()
macosX64()
macosArm64()
Expand Down
4 changes: 2 additions & 2 deletions docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,13 @@ All functionality is supported, except:
* `env` parameter of [editText][editText] and [editFile][editFile] is ignored.
* [file][file] and [path][path] parameter types are not supported.

### NodeJS
### NodeJS JavaScript and WasmJS

All functionality is supported, except:

* [file][file] and [path][path] parameter types are not supported.

### Browser JavaScript
### Browser JavaScript and WasmJS

All functionality is supported, except:

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kotlin = "1.9.23"
mordant = "com.github.ajalt.mordant:mordant:2.5.0"

# used in tests
kotest = "io.kotest:kotest-assertions-core:5.8.1"
kotest = "io.kotest:kotest-assertions-core:5.9.0.1440-SNAPSHOT"
systemrules = "com.github.stefanbirkner:system-rules:1.19.0"
jimfs = "com.google.jimfs:jimfs:1.3.0"

Expand Down
5 changes: 5 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ include("samples:json")
dependencyResolutionManagement {
repositories {
mavenCentral()
// TODO: we can remove this once kotest releases a new version
maven {
url= uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
mavenContent { snapshotsOnly() }
}
}
}

0 comments on commit 3f0877a

Please sign in to comment.