admin管理员组文章数量:1125746
I'm trying to publish few scalamock
modules for jvm
and js
simultaniously.
I'm using sbt-crosspublish
and sbt-ci-release
.
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.2")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
The problem is - it publishes scalamock-zio
as ziojvm
. How can I make it scalamock-zio
instead?
.scalamock/ziojvm_3/7.0.0
Should I add withoutSuffixFor(JVMPlatform)
and change sbt project name to scalamock-zio
?
Also not sure why scalamock
published correct having same settings, not scalamockjvm
?
Expecting artifact for zio
and cats-effect
modules published as scalamock-zio
and not ziojvm
, scalamock-cats-effect
and not cats-effectjvm
.
Current build.sbt
import sbtcrossproject.CrossPlugin.autoImport.crossProject
lazy val scalatest = Def.setting("org.scalatest" %%% "scalatest" % "3.2.19")
lazy val specs2 = Def.setting("org.specs2" %%% "specs2-core" % "4.20.8")
val commonSettings = Defaults.coreDefaultSettings ++ Seq(
scalaVersion := "3.4.3",
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-feature",
"-experimental"
)
)
lazy val root = project.in(file("."))
.settings(
publish / skip := true
)
.aggregate(
scalamock.jvm,
scalamock.js,
zio.jvm,
zio.js,
`cats-effect`.jvm,
`cats-effect`.js
)
lazy val scalamock = crossProject(JSPlatform, JVMPlatform)
.in(file("core"))
.settings(
commonSettings,
name := "scalamock",
Compile / packageBin / publishArtifact := true,
Compile / packageDoc / publishArtifact := true,
Compile / packageSrc / publishArtifact := true,
Test / publishArtifact := false,
Compile / doc / scalacOptions ++= Opts.doc.title("ScalaMock") ++
Opts.doc.version(version.value) ++ Seq("-doc-root-content", "rootdoc.txt", "-version"),
libraryDependencies ++= Seq(
scalatest.value % Optional,
specs2.value % Optional
),
)
lazy val zio = crossProject(JSPlatform, JVMPlatform)
.in(file("zio"))
.settings(
name := "scalamock-zio",
commonSettings,
Compile / packageBin / publishArtifact := true,
Compile / packageDoc / publishArtifact := true,
Compile / packageSrc / publishArtifact := true,
Test / publishArtifact := false,
libraryDependencies ++= {
val zioVersion = "2.1.14"
Seq(
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-test" % zioVersion % Test,
"dev.zio" %%% "zio-test-sbt" % zioVersion % Test
)
}
)
.dependsOn(scalamock)
lazy val `cats-effect` = crossProject(JSPlatform, JVMPlatform)
.in(file("cats-effect"))
.settings(
name := "scalamock-cats-effect",
commonSettings,
Compile / packageBin / publishArtifact := true,
Compile / packageDoc / publishArtifact := true,
Compile / packageSrc / publishArtifact := true,
Test / publishArtifact := false,
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "3.5.7",
"org.typelevel" %% "munit-cats-effect" % "2.0.0" % Test
)
)
.dependsOn(scalamock)
lazy val examples = project in file("core/examples") settings(
commonSettings,
name := "ScalaMock Examples",
publish / skip := true,
libraryDependencies ++= Seq(
scalatest.value % Test,
specs2.value % Test
)
) dependsOn scalamock.jvm
inThisBuild(
List(
organization := "org.scalamock",
homepage := Some(url("/")),
licenses := List(
"MIT" -> url(";)
),
developers := List(
Developer("paulbutcher", "Paul Butcher", "", url("/")),
Developer("barkhorn", "Philipp Meyerhoefer", "", url(";)),
Developer("goshacodes", "Georgii Kovalev", "", url(";))
)
)
)
本文标签: scalasbtcrossproject publishes jvm project with unexpected nameStack Overflow
版权声明:本文标题:scala - sbt-crossproject publishes jvm project with unexpected name - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736631065a1945779.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论