Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Commit

Permalink
fix sbt release
Browse files Browse the repository at this point in the history
  • Loading branch information
yanns committed Dec 23, 2019
1 parent 8021d7b commit bf1dfe9
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions build.sbt
@@ -1,6 +1,17 @@
import sbt.Developer
import sbt.Keys.{crossScalaVersions, developers, organizationHomepage, scalacOptions, scmInfo, startYear}

// has to be set for all modules to allow 'sbt release'
// [error] Repository for publishing is not specified.
publishTo in ThisBuild := Some(
if (isSnapshot.value)
"snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
else
"releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")

releaseCrossBuild in ThisBuild := true
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.10", "2.13.0")

/* Define the different sbt projects of sangria
*/

Expand All @@ -9,15 +20,16 @@ lazy val root = project
.withId("sangria-root")
.aggregate(core, benchmarks)
.settings(
commonSettings,
inThisBuild(projectInfo ++ scalaSettings ++ shellSettings)
)
.settings(
noPublishSettings
)

lazy val core = project
.in(file("modules/core"))
.withId("sangria-core")
.settings(
commonSettings,
name := "sangria",
description := "Scala GraphQL implementation",
mimaPreviousArtifacts := Set("org.sangria-graphql" %% "sangria" % "1.4.2"),
Expand Down Expand Up @@ -54,16 +66,10 @@ lazy val core = project
),

// Publishing
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := (_ => false),
publishTo := Some(
if (isSnapshot.value)
"snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
else
"releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
pomIncludeRepository := (_ => false)
)

lazy val benchmarks = project
Expand All @@ -72,7 +78,6 @@ lazy val benchmarks = project
.dependsOn(core)
.enablePlugins(JmhPlugin)
.settings(
commonSettings,
noPublishSettings,
name := "sangria-benchmarks",
description := "Benchmarks of Sangria functionality",
Expand All @@ -81,8 +86,6 @@ lazy val benchmarks = project
/* Commonly used functionality across the projects
*/

lazy val commonSettings = projectInfo ++ scalaSettings ++ shellSettings

lazy val projectInfo = Seq(
organization := "org.sangria-graphql",
homepage := Some(url("http://sangria-graphql.org")),
Expand Down

0 comments on commit bf1dfe9

Please sign in to comment.