Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

201 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ktjs-echarts

Kotlin/JS wrappers for the echarts ecosystem.

English | 简体中文

Documentation · Live demo · API reference

The repository keeps one Gradle module per npm package, or per group of packages that share an upstream version and release cadence. The project's namesake package owns the ktjs-echarts module; wrapper modules use the ktjs-echarts-* prefix, while kmp-echarts-json is a pure Kotlin Multiplatform model of the ECharts option schema and does not bind an npm package. Tree shaking removes unused declarations from the final application bundle, so grouping related packages into one module is cheaper than one module per package.

Modules

Module npm package Wrapper version Maven Central
ktjs-echarts echarts 6.1.0-kt.1 Maven Central
ktjs-echarts-gl echarts-gl 2.1.0-kt.1 Maven Central
kmp-echarts-json echarts option schema 6.1.0-kt.1 Maven Central

Versioning

Each module is versioned as {upstream npm version}-kt.{revision}. The upstream npm versions are declared once in the root package.json; the revision is read per module from wrapper-revisions.properties. Gradle derives the base version and the npm(...) dependency from these two files:

  • Only -kt.N versions are published; a version without the suffix never exists.
  • Upstream upgrade: change the version in package.json; the base version follows automatically while the revision stays, even when the wrapper code itself did not change.
  • Wrapper-only fix: the revision increments (kt.2, kt.3, ...) while the base version stays.
  • Revisions are tracked per module and only ever increase; they never reset to kt.1. A release bumps and publishes only the modules that changed.

Requirements

  • JDK 17 or newer (the build uses Gradle 9.4.1).
  • Node.js is downloaded automatically by the Kotlin Gradle plugin. npm is used because Yarn is disabled in gradle.properties.
  • Chromium is downloaded by Playwright the first time browser tests run.
  • The demo's end-to-end test is a Playwright JUnit 5 suite that drives the bundled page, so node must also be on PATH.

Build and test

./gradlew build

# Per-module tests
./gradlew :ktjs-echarts:jsBrowserTest

# End-to-end checks for the bundled demo page (Playwright, needs node on PATH)
./gradlew :demo:e2eTest

# GitHub Pages site (docs at the root, the demo under /demo/, Dokka output under /api/)
./gradlew pagesSite

After adding or upgrading an npm dependency in a module, refresh the shared lock file:

./gradlew kotlinUpgradePackageLock

Installation

Releases are published to Maven Central under the io.github.shijianjs group. Replace the version with the one you need ({upstream version}-kt.{revision}):

dependencies {
    implementation("io.github.shijianjs:ktjs-echarts:6.1.0-kt.1")
}

kmp-echarts-json is installed the same way and is used on the side that builds the option payload; see its README.

The POMs point at this GitHub repository (url and scm.url), and every module is a Kotlin Multiplatform project publishing kotlin-tooling-metadata.json. Those are the requirements for klibs.io to discover the libraries automatically.

Publishing

Publishing is configured once in the root build.gradle.kts for all modules. Releases run through .github/workflows/release.yml: it signs the artifacts, packages one archive per Maven coordinate and registers them with the shared Maven Central hub. The hub later merges the pending registrations into a single Central deployment. See the publishing section in AGENTS.md for the one-time setup.

License

Released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages