From 98498fef9df7e13c5aff0b407c058d1e980a3d84 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Thu, 20 Jul 2023 14:09:42 +0200 Subject: [PATCH 1/2] docs: add a link to overriding the publishing convention I was helping out someone today and assumed I'd find reference to `CrossVersion` in the publishing section since they were trying to publish a java artifact and looking for `CrossVersion.disabled`. However it's in the cross-build page. This adds a small note in the publishing page and then links it to the more detailed version in the cross build page. --- .../03-Dependency-Management/05-Publishing.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md b/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md index b4ddc0491..78875e80b 100644 --- a/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md +++ b/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md @@ -150,6 +150,15 @@ To support multiple incompatible Scala versions, enable cross building and do `+ publish` (see [Cross Build][Cross-Build]). See [Resolvers] for other supported repository types. +### Overriding the publishing convention + +By default sbt will publish your artifact with the binary version of Scala +you're using. For example if your project is using Scala 2.13.x your example +artifact would be published under `example_2.13`. This is often what you want, +but if you're publishing a pure java artifact or a compiler plugin you'll want +to change the `CrossVersion`. See the [Cross Build][Cross-Build] page for more +details under the _Overriding the publishing convention_ section. + ### Published artifacts By default, the main binary jar, a sources jar, and a API documentation From ad6ac28fc7a63459a931a316bbf3f395a17d8acd Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Fri, 21 Jul 2023 09:17:30 +0200 Subject: [PATCH 2/2] Update src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md Co-authored-by: eugene yokota --- .../02-DetailTopics/03-Dependency-Management/05-Publishing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md b/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md index 78875e80b..e49ff9d3b 100644 --- a/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md +++ b/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md @@ -155,7 +155,7 @@ supported repository types. By default sbt will publish your artifact with the binary version of Scala you're using. For example if your project is using Scala 2.13.x your example artifact would be published under `example_2.13`. This is often what you want, -but if you're publishing a pure java artifact or a compiler plugin you'll want +but if you're publishing a pure Java artifact or a compiler plugin you'll want to change the `CrossVersion`. See the [Cross Build][Cross-Build] page for more details under the _Overriding the publishing convention_ section.