Skip to content

v0.3.0

Latest

Choose a tag to compare

@CoreyKaylor CoreyKaylor released this 04 Oct 13:44

Artboard now combines multi-module builds into one gallery, and works with Compose Multiplatform 1.12.

Highlights

One gallery for multi-module builds (#4)
Apply the plugin to each module that has previews; nothing is needed at the root. Running a task without a project path now combines every module instead of starting one server per module:

./gradlew artboardRun      # one server, one tab per module
./gradlew artboardRunLan   # the same, reachable on the local network
./gradlew artboardExport   # each module's export, plus build/artboard/combined-export
  • Each tab is that module's own gallery, live or snapshot, so one build can mix both.
  • Modules appear as their builds finish.
  • A module run on its own (./gradlew :feature:a:artboardRun) is unchanged: no tabs.
  • The combined export is a static site for GitHub Pages or any other static host. Single-module exports never touch it.
  • The tabs use the gallery's own chrome and follow its light/dark setting. They support the keyboard, and Back/Forward step through tabs.

Modules can join only while the run tasks execute in parallel. That is the default with the configuration cache; otherwise pass --parallel. A serial build prints a warning and serves the first module only.

Fixes

Compose Multiplatform 1.12 support (#5)
CMP 1.12 changed two APIs Artboard relied on. With CMP 1.12 in 0.2.x:

  • JVM snapshots failed with NoSuchMethodError: …Image.encodeToData$default….
  • PNG download in live galleries failed at runtime.
  • Previews that read isSystemInDarkTheme() crashed in live galleries with illegal cast.
  • Dark JVM snapshots silently rendered light.

Artboard now uses only APIs that are stable across both versions, so 0.3.0 works with CMP 1.11 and 1.12. Snapshot PNGs are pixel-identical to before. Thanks to @Tommyten for the report.

Upgrade

id("io.github.crowded-libs.artboard") version "0.3.0"

No consumer source changes required.