docs: Document the sbt-uni-crossproject plugin - #627
Conversation
Add a Build Tooling reference page for the new minimal sbt 2.x crossproject plugin (CrossType.Pure), mirroring the sbt-uni-playwright page, and link it in both duplicated sidebars. Verified with pnpm docs:build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request adds documentation for the new sbt-uni-crossproject plugin, including updating the VitePress sidebar configuration. The review feedback focuses on improving the documentation by using the more idiomatic Test configuration object instead of the string literal "test", ensuring consistency in method naming within the API table, and documenting the .configs(...) method.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| lazy val app = crossProject(JVMPlatform, JSPlatform, NativePlatform) | ||
| .crossType(CrossType.Pure) | ||
| .in(file("app")) | ||
| .dependsOn(core, core % "test") |
There was a problem hiding this comment.
In sbt, it is more idiomatic and common to use the Test configuration object (e.g., core % Test) rather than the string literal "test" (e.g., core % "test"). Since the scripted tests for this plugin also use core % Test, updating this example to use Test improves consistency and follows standard sbt practices.
| .dependsOn(core, core % "test") | |
| .dependsOn(core, core % Test) |
| | `.jvmSettings` / `.jsSettings` / `.nativeSettings`| Settings applied to one platform only | | ||
| | `.configure(...)` / `.jvmConfigure` / `.jsConfigure` / `.nativeConfigure` | Apply `Project => Project` transforms | |
There was a problem hiding this comment.
The methods .jvmSettings, .jsSettings, .nativeSettings, .jvmConfigure, .jsConfigure, and .nativeConfigure all accept arguments (e.g., settings definitions or project transformers). Adding parentheses/parameter placeholders (like (...)) to these method names in the table makes them consistent with other methods like .settings(...) and .configure(...).
| | `.jvmSettings` / `.jsSettings` / `.nativeSettings`| Settings applied to one platform only | | |
| | `.configure(...)` / `.jvmConfigure` / `.jsConfigure` / `.nativeConfigure` | Apply `Project => Project` transforms | | |
| | .jvmSettings(...) / .jsSettings(...) / .nativeSettings(...) | Settings applied to one platform only | | |
| | .configure(...) / .jvmConfigure(...) / .jsConfigure(...) / .nativeConfigure(...) | Apply Project => Project transforms | |
| | `.settings(...)` | Settings applied to every platform project | | ||
| | `.jvmSettings` / `.jsSettings` / `.nativeSettings`| Settings applied to one platform only | | ||
| | `.configure(...)` / `.jvmConfigure` / `.jsConfigure` / `.nativeConfigure` | Apply `Project => Project` transforms | | ||
| | `.enablePlugins(...)` / `.disablePlugins(...)` | Enable/disable sbt plugins on every platform project | |
There was a problem hiding this comment.
The CrossProject class also exposes a public .configs(...) method (defined on line 55 of CrossProject.scala) to add configurations to all platform projects. It would be beneficial to document this method in the API table to ensure completeness.
| | `.enablePlugins(...)` / `.disablePlugins(...)` | Enable/disable sbt plugins on every platform project | | |
| | .enablePlugins(...) / .disablePlugins(...) | Enable/disable sbt plugins on every platform project | | |
| | .configs(...) | Add configurations to every platform project | |
| | `.jvmSettings` / `.jsSettings` / `.nativeSettings`| Settings applied to one platform only | | ||
| | `.configure(...)` / `.jvmConfigure` / `.jsConfigure` / `.nativeConfigure` | Apply `Project => Project` transforms | | ||
| | `.enablePlugins(...)` / `.disablePlugins(...)` | Enable/disable sbt plugins on every platform project | | ||
| | `.dependsOn(other, other % "test")` | Depend on another cross-project, optionally scoped to a config| |
There was a problem hiding this comment.
Using the Test configuration object is more idiomatic in sbt than the string literal "test". Updating this row to use Test aligns with standard sbt practices.
| | `.dependsOn(other, other % "test")` | Depend on another cross-project, optionally scoped to a config| | |
| | .dependsOn(other, other % Test) | Depend on another cross-project, optionally scoped to a config | |
What
Adds a Build Tooling reference page for
sbt-uni-crossproject(merged in #623), mirroring thesbt-uni-playwrightpage, and links it in both duplicated sidebars inconfig.mts.Covers: installation (with
__UNI_VERSION__), thecrossProject(...)usage and val-name →coreJVM/coreJS/coreNativederivation, theCrossType.Puredirectory layout, the%%-on-sbt-2.x note, and a supported-API table — all verified against the merged source.Validation
pnpm docs:buildsucceeds (no dead links).🤖 Generated with Claude Code