Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ jobs:
- name: Publish to Maven Central
env:
# Select the dedicated CI signing key (build.sbt reads PGP_KEY_HEX).
PGP_KEY_HEX: FEDF83887D777EC053C0B0BC79C4122F7D97ADEC
# Shared early-effect org secret — rotate the key here, not in build.sbt.
PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
# sbt 1.11 auto-appends a central.sonatype.com credential from these.
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# marklit

[![Maven Repository](https://img.shields.io/maven-central/v/io.github.russwyte/sbt-marklit_sbt2_3?logo=apachemaven)](https://mvnrepository.com/artifact/io.github.russwyte/sbt-marklit)
[![Maven Repository](https://img.shields.io/maven-central/v/rocks.earlyeffect/sbt-marklit_sbt2_3?logo=apachemaven)](https://mvnrepository.com/artifact/rocks.earlyeffect/sbt-marklit)

**Typechecked Scala documentation that actually runs your code — across multiple Scala versions, in the same file.**

Expand All @@ -13,7 +13,7 @@ If your docs claim something works, marklit makes the build break when it doesn'
marklit ships as an sbt plugin (sbt 2.0+, published for Scala 3). Add it to `project/plugins.sbt`:

```scala
addSbtPlugin("io.github.russwyte" % "sbt-marklit" % "0.1.0")
addSbtPlugin("rocks.earlyeffect" % "sbt-marklit" % "0.1.0")
```

The plugin is an `AutoPlugin` triggered on every JVM project — no `enablePlugins` needed. It calls marklit's compiler in-process (no subprocess), so the only thing it adds to your build is the plugin dependency. See [Build tool integration](#build-tool-integration) for wiring up a docs project.
Expand Down Expand Up @@ -312,7 +312,7 @@ Notes:

```scala
// project/plugins.sbt
addSbtPlugin("io.github.russwyte" % "sbt-marklit" % "0.1.0")
addSbtPlugin("rocks.earlyeffect" % "sbt-marklit" % "0.1.0")
```

```scala
Expand Down Expand Up @@ -346,7 +346,7 @@ A worked multi-version example lives in [examples/sbt/](examples/sbt/).

```scala
//| mvnDeps:
//| - io.github.russwyte::mill-marklit:0.1.0
//| - rocks.earlyeffect::mill-marklit:0.1.0

import marklit.mill.MarklitModule

Expand Down
26 changes: 13 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ val zioVersion = "2.1.26"
val coursierInterfaceVersion = "1.0.9"

ThisBuild / scalaVersion := marklitScalaVersion
ThisBuild / organization := "io.github.russwyte"
ThisBuild / organization := "rocks.earlyeffect"
// version is derived from git tags by sbt-dynver (tag v0.1.0 -> 0.1.0).

ThisBuild / organizationName := "russwyte"
ThisBuild / organizationHomepage := Some(url("https://github.com/russwyte"))
ThisBuild / organizationName := "Early Effect"
ThisBuild / organizationHomepage := Some(url("https://www.earlyeffect.rocks"))
ThisBuild / licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")
)
ThisBuild / homepage := Some(url("https://github.com/russwyte/marklit"))
ThisBuild / homepage := Some(url("https://github.com/early-effect/marklit"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/russwyte/marklit"),
"scm:git@github.com:russwyte/marklit.git"
url("https://github.com/early-effect/marklit"),
"scm:git@github.com:early-effect/marklit.git"
)
)
ThisBuild / developers := List(
Expand All @@ -53,12 +53,12 @@ ThisBuild / publishTo := {
else localStaging.value
}

// PGP key used to sign published artifacts (sbt-pgp + local gpg keyring).
// CI overrides the key via PGP_KEY_HEX (dedicated GitHub Actions signing key);
// local manual publishing falls back to the personal key on this machine.
usePgpKeyHex(
sys.env.getOrElse("PGP_KEY_HEX", "2F64727A87F1BCF42FD307DD8582C4F16659A7D6")
)
// CI-only publishing: the signing key hex comes from the PGP_KEY_HEX env var, set
// by the shared early-effect org secret in the release workflow. There is no real
// key in this file — the "MISSING_KEY_HEX" sentinel keeps the build loadable for
// local compile/test but makes signing fail loudly if anyone tries to publish
// off-CI. Rotating the key is a one-place change to the PGP_KEY_HEX org secret.
usePgpKeyHex(sys.env.getOrElse("PGP_KEY_HEX", "MISSING_KEY_HEX"))

// Copy a packaged jar (an sbt 2.0 virtual file ref) into a resource dir.
// fileConverter must be read inside each Def.task — `.value` is a macro that
Expand Down Expand Up @@ -324,7 +324,7 @@ lazy val plugin = project
// records the libraryDependency below for downstream resolution).
scalaVersion := marklitScalaVersion,
libraryDependencies +=
"io.github.russwyte" %% "marklit-compiler" % version.value,
"rocks.earlyeffect" %% "marklit-compiler" % version.value,
scalacOptions := Seq("-deprecation", "-feature"),
// Scripted tests: publish this plugin + its libs to the local repo first,
// and pass the version through so each test's project/plugins.sbt can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ object OutputIsolationSpec extends ZIOSpecDefault:
}
)
// TODO: ZIO service pattern tests require external dependency support
// See: https://github.com/russwyte/marklit/issues/XX - add classpath config for CLI and plugins
// See: https://github.com/early-effect/marklit/issues/XX - add classpath config for CLI and plugins
).provideShared(
TestCompilerLayer.layer
) @@ TestAspect.sequential
2 changes: 1 addition & 1 deletion examples/mill/build.mill
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//| mvnDeps:
//| - io.github.russwyte::mill-marklit:0.1.0-LOCAL
//| - rocks.earlyeffect::mill-marklit:0.1.0-LOCAL

package build

Expand Down
2 changes: 1 addition & 1 deletion examples/sbt/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("io.github.russwyte" % "sbt-marklit" % "0.1.0-LOCAL")
addSbtPlugin("rocks.earlyeffect" % "sbt-marklit" % "0.1.0-LOCAL")
6 changes: 3 additions & 3 deletions mill-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mill Marklit Plugin

A Mill plugin for [marklit](https://github.com/russwyte/marklit) - typechecked Scala documentation.
A Mill plugin for [marklit](https://github.com/early-effect/marklit) - typechecked Scala documentation.

> **Not yet published.** Build and publish it locally first (see
> [Building from Source](#building-from-source)), then depend on the local
Expand All @@ -14,7 +14,7 @@ Declare the plugin in your `build.mill` header:

```scala
//| mvnDeps:
//| - io.github.russwyte::mill-marklit:0.1.0
//| - rocks.earlyeffect::mill-marklit:0.1.0

import marklit.mill.MarklitModule
```
Expand All @@ -25,7 +25,7 @@ Mix `MarklitModule` into your module:

```scala
//| mvnDeps:
//| - io.github.russwyte::mill-marklit:0.1.0
//| - rocks.earlyeffect::mill-marklit:0.1.0

import mill._
import mill.scalalib._
Expand Down
8 changes: 4 additions & 4 deletions mill-plugin/build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object plugin extends ScalaModule with PublishModule {

def mvnDeps = Seq(
mvn"com.lihaoyi::mill-libs:1.1.5",
mvn"io.github.russwyte::marklit-compiler:$marklitVersion"
mvn"rocks.earlyeffect::marklit-compiler:$marklitVersion"
)

// Plugin source only — the orchestration lives in marklit-compiler.
Expand All @@ -50,10 +50,10 @@ object plugin extends ScalaModule with PublishModule {

def pomSettings = PomSettings(
description = "Mill plugin for marklit - typechecked Scala documentation",
organization = "io.github.russwyte",
url = "https://github.com/russwyte/marklit",
organization = "rocks.earlyeffect",
url = "https://github.com/early-effect/marklit",
licenses = Seq(License.`Apache-2.0`),
versionControl = VersionControl.github("russwyte", "marklit"),
versionControl = VersionControl.github("early-effect", "marklit"),
developers = Seq(
Developer("russwyte", "Russ White", "https://github.com/russwyte")
)
Expand Down
2 changes: 1 addition & 1 deletion mill-plugin/src/marklit/mill/MarklitModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import marklit.MarklitRunConfig
* Example usage:
* {{{
* //| mvnDeps:
* //| - io.github.russwyte::mill-marklit:0.1.0-LOCAL
* //| - rocks.earlyeffect::mill-marklit:0.1.0-LOCAL
*
* import marklit.mill.MarklitModule
*
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=2.0.0
sbt.version=2.0.1
2 changes: 1 addition & 1 deletion sbt-plugin/src/sbt-test/marklit/basic/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin(
"io.github.russwyte" % "sbt-marklit" % sys.props("plugin.version")
"rocks.earlyeffect" % "sbt-marklit" % sys.props("plugin.version")
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin(
"io.github.russwyte" % "sbt-marklit" % sys.props("plugin.version")
"rocks.earlyeffect" % "sbt-marklit" % sys.props("plugin.version")
)
Loading