Skip to content

Commit

Permalink
docs: update usage instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Artyom Shendrik <[email protected]>
  • Loading branch information
amal committed May 25, 2023
1 parent 3961829 commit 632764e
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,34 @@ Compatibility tested with:

### How to use

[![JitPack][badge-jitpack]][jitpack]
[![Gradle Plugin Portal][badge-plugin]][plugin]

```kotlin
// in the `build.gradle.kts` of the target module
plugins {
kotlin("multiplatform") version "1.8.21" // <-- multiplatform or js, versions from 1.6.20 to 1.9
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.12.1" // <-- 0.8 .. 0.13
id("io.github.fluxo-kt.binary-compatibility-validator-js") version "0.0.1-rc" // <-- add here
}
kotlin {
js(IR) {
binaries.executable() // required to generate TS definitions
nodejs() // or browser()
}
}
```

Plugin can be used from the [JitPack][jitpack] like this:
<details>
<summary>How to use snapshots from JitPack repository</summary>

[![JitPack][badge-jitpack]][jitpack]

```kotlin
// in the `build.gradle.kts` of the target module
plugins {
kotlin("multiplatform") version "1.8.21" // <-- multiplatform or js, versions from 1.6.20 to 1.9
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.12.1" // <-- 0.8 .. 0.13
id("io.github.fluxo-kt.binary-compatibility-validator-js") // <-- add here
id("io.github.fluxo-kt.binary-compatibility-validator-js") // <-- add here, no version needed for jitpack usage
}
kotlin {
js(IR) {
Expand All @@ -76,6 +94,7 @@ pluginManagement {
}
}
```
</details>

Module examples for:
- [Kotlin Multiplatform](checks/latest/build.gradle.kts)
Expand Down

0 comments on commit 632764e

Please sign in to comment.