Skip to content

Commit

Permalink
Fix publishing to sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
EmergentOrder committed Oct 6, 2019
1 parent 1e2b8e5 commit db02f3b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
29 changes: 23 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ lazy val common = (crossProject(JSPlatform, JVMPlatform)
scala213Version,
scala211Version
),
publishArtifact in (Compile, packageDoc) := false
// sources in (Compile, doc) := Seq(),
// publishArtifact in (Compile, packageDoc) := false
)
.jsSettings(
crossScalaVersions := Seq(scala212Version, scala211Version, scala213Version)
Expand All @@ -56,7 +57,8 @@ lazy val programGenerator = (crossProject(JVMPlatform)//,JSPlatform)
libraryDependencies ++= Seq(
("org.scalameta" %% "scalameta" % scalametaVersion)
),
publishArtifact in (Compile, packageDoc) := false
// sources in (Compile, doc) := Seq(),
// publishArtifact in (Compile, packageDoc) := false
)
.jvmSettings(
crossScalaVersions := Seq(
Expand All @@ -81,7 +83,8 @@ lazy val backends = (crossProject(JVMPlatform) //JSPlatform)
libraryDependencies ++= Seq(
"org.bytedeco" % "ngraph-platform" % "0.25.0-1.5.2-SNAPSHOT"
),
publishArtifact in (Compile, packageDoc) := false
// sources in (Compile, doc) := Seq(),
// publishArtifact in (Compile, packageDoc) := false
)
.jvmSettings(
crossScalaVersions := Seq(scala212Version, scala213Version, scala211Version)
Expand Down Expand Up @@ -114,7 +117,8 @@ lazy val core = (crossProject(JSPlatform, JVMPlatform)
scala213Version,
scala211Version
),
publishArtifact in (Compile, packageDoc) := false,
// sources in (Compile, doc) := Seq(),
// publishArtifact in (Compile, packageDoc) := false,
libraryDependencies ++= (CrossVersion
.partialVersion(scalaVersion.value) match {
case Some((2, n)) =>
Expand Down Expand Up @@ -165,7 +169,8 @@ lazy val zio = (crossProject(JVMPlatform)//, JSPlatform)
commonSettings,
name := "onnx-scala-zio",
// scalaVersion := scala213Version,
publishArtifact in (Compile, packageDoc) := false,
// sources in (Compile, doc) := Seq(),
// publishArtifact in (Compile, packageDoc) := false,
libraryDependencies ++= (CrossVersion
.partialVersion(scalaVersion.value) match {
case _ =>
Expand All @@ -182,6 +187,9 @@ lazy val zio = (crossProject(JVMPlatform)//, JSPlatform)
// )

skip in publish := true
sonatypeProfileName := "com.github.EmergentOrder"
//sonatypeSessionName := s"[sbt-sonatype] ${name.value} ${version.value}"
//sources in (Compile, packageDoc) := Seq()

lazy val sonatypeSettings = Seq(
organization := "com.github.EmergentOrder",
Expand All @@ -193,6 +201,15 @@ developers := List(Developer("EmergentOrder",
"lecaran@gmail.com",
url("https://github.com/EmergentOrder"))),
licenses += ("AGPL-3.0", url("https://www.gnu.org/licenses/agpl-3.0.html")),
sonatypeProfileName := "lecaran",
publishMavenStyle := true,
publishTo := sonatypePublishToBundle.value
publishConfiguration := publishConfiguration.value.withOverwrite(true),
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true),
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
)
//publishTo := sonatypePublishToBundle.value
)
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.3.4")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.7")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.6")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1-M3")

0 comments on commit db02f3b

Please sign in to comment.