From 92df69c3a673ca6cfc75e89f0fdd5fa8d2234f70 Mon Sep 17 00:00:00 2001 From: Roberto Tyley <52038+rtyley@users.noreply.github.com> Date: Tue, 6 Aug 2024 15:43:46 +0100 Subject: [PATCH] Clarify that non-artifact-producing modules need `publish / skip := true` We missed this in https://github.com/guardian/permissions/pull/203 - adding a new subproject that _didn't_ produce a Maven artifact, `sbt-version-policy` needs to be told to ignore the subproject when performing the automated compatibility assessment, otherwise it will attempt to download the prior version of that subproject (which definitely doesn't exist). See also: * https://github.com/guardian/permissions/pull/233 --- docs/configuration.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index f9fbc6e..f7d51c6 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -93,7 +93,7 @@ library. `1.4.7` release. The workflow will automatically update the `version` during each release, as appropriate. [Example `build.sbt`](https://github.com/guardian/etag-caching/blob/main/build.sbt) -* Artifact-producing modules +* **Artifact-producing modules** - any module (project or subproject) that creates an artifact for Maven Central * `organization` - this dictates the [groupId](https://maven.apache.org/guides/mini/guide-naming-conventions.html) of your artifacts, and can be either the same as your Sonatype account profile name (eg `com.gu` for the Guardian), or a dot-suffixed version of it (eg `com.gu.foobar`) if your project ('foobar') releases multiple artifacts @@ -108,13 +108,14 @@ library. but while this can be a relatively new version of Java, in order for your compiled code to support _older_ versions of Java, and avoid `UnsupportedClassVersionError` errors, you'll need to set this flag. See also [Scala/Java compatibility](https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html). -* Top-level 'release' module - if your project has a [multi-module](https://www.scala-sbt.org/1.x/docs/Multi-Project.html) +* **Non-artifact-producing modules** - any module that _doesn't_ make an artifact to publish to Maven Central + (often, the 'root' project in a multi-project build) + * `publish / skip := true` (rather than other legacy hacks like `publishArtifact := false`). This setting is + respected by `sbt-version-policy` - it won't attempt to calculate compatibility on a module that doesn't + publish artifacts. +* **Top-level 'release' module** - if your project has a [multi-module](https://www.scala-sbt.org/1.x/docs/Multi-Project.html) build this could be called 'root', or, if your project only has one module, it and your artifact-producing module could be the same thing, and just use top-level settings. - * `publish / skip := true` (rather than other legacy hacks like `publishArtifact := false`) for - sbt modules that don't generate artifacts (often, the 'root' project in a multi-project build). This - setting is respected by `sbt-version-policy` - it won't attempt to calculate compatibility on a module - that doesn't publish artifacts. * In `releaseProcess`, you'll want _fewer_ steps than [the old list specified by `sbt-sonatype`](https://github.com/xerial/sbt-sonatype?tab=readme-ov-file#using-with-sbt-release-plugin), now just: