Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ lazy val `evaluator-server` = (project in file("server"))
)
.settings(compilerDependencySettings: _*)

onLoad in Global := (Command.process("project evaluator-server", _: State)) compose (onLoad in Global).value
onLoad in Global := (Command.process("project evaluator-server", _: State)) compose (onLoad in Global).value
addCommandAlias("publishSignedAll", ";evaluator-shared/publishSigned;evaluator-client/publishSigned")
37 changes: 37 additions & 0 deletions project/EvaluatorBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import org.scalafmt.sbt.ScalaFmtPlugin
import org.scalafmt.sbt.ScalaFmtPlugin.autoImport._
import de.heikoseeberger.sbtheader.{HeaderPattern, HeaderPlugin}
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport._
import com.typesafe.sbt.SbtPgp.autoImport._
import sbt.Keys._
import sbt._

Expand Down Expand Up @@ -31,6 +32,7 @@ object EvaluatorBuild extends AutoPlugin {
baseSettings ++
reformatOnCompileSettings ++
dependencySettings ++
publishSettings ++
miscSettings


Expand Down Expand Up @@ -91,4 +93,39 @@ object EvaluatorBuild extends AutoPlugin {
s"$blue$projectName$white>${c.RESET}"
}
)

private[this] lazy val gpgFolder = sys.env.getOrElse("SE_GPG_FOLDER", ".")

private[this] lazy val publishSettings = Seq(
organizationName := "Scala Exercises",
organizationHomepage := Some(new URL("http://scala-exercises.org")),
startYear := Some(2016),
description := "Scala Exercises: The path to enlightenment",
homepage := Some(url("http://scala-exercises.org")),
pgpPassphrase := Some(sys.env.getOrElse("SE_GPG_PASSPHRASE", "").toCharArray),
pgpPublicRing := file(s"$gpgFolder/pubring.gpg"),
pgpSecretRing := file(s"$gpgFolder/secring.gpg"),
credentials += Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
sys.env.getOrElse("PUBLISH_USERNAME", ""),
sys.env.getOrElse("PUBLISH_PASSWORD", "")),
scmInfo := Some(
ScmInfo(
url("https://github.com/scala-exercises/evaluator"),
"https://github.com/scala-exercises/evaluator.git"
)
),
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := Function.const(false),
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("Snapshots" at nexus + "content/repositories/snapshots")
else
Some("Releases" at nexus + "service/local/staging/deploy/maven2")
}
)
}
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.1")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.2.11")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "1.6.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1")