Skip to content

Adds settings for distributing projects in Sonatype #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 7, 2016
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
62 changes: 58 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
lazy val stdlib = (project in file("."))
.settings(publishSettings:_*)
.enablePlugins(ExerciseCompilerPlugin)
.settings(
organization := "org.scalaexercises",
organization := "org.scala-exercises",
name := "content-stdlib",
scalaVersion := "2.11.7",
version := "0.0.0-SNAPSHOT",
Expand All @@ -11,9 +12,62 @@ lazy val stdlib = (project in file("."))
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.2.5",
"org.scalatest" %% "scalatest" % "2.2.4",
"org.scalaexercises" %% "runtime" % "0.0.0-SNAPSHOT" changing(),
"org.scalaexercises" %% "definitions" % "0.0.0-SNAPSHOT" changing(),
"org.scala-exercises" %% "runtime" % "0.0.0-SNAPSHOT" changing(),
"org.scala-exercises" %% "definitions" % "0.0.0-SNAPSHOT" changing(),
"org.scalacheck" %% "scalacheck" % "1.12.5",
"com.github.alexarchambault" %% "scalacheck-shapeless_1.12" % "0.3.1"
)
),
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
)


// Distribution

lazy val gpgFolder = sys.env.getOrElse("SE_GPG_FOLDER", ".")

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/exercises-stdlib"), "https://github.com/scala-exercises/exercises-stdlib.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")
},
pomExtra :=
<developers>
<developer>
<id>raulraja</id>
<name>Raul Raja</name>
<email>[email protected]</email>
</developer>
<developer>
<id>dialelo</id>
<name>Alejandro Gómez</name>
<email>[email protected]</email>
</developer>
<developer>
<id>rafaparadela</id>
<name>Rafa Paradela</name>
<email>[email protected]</email>
</developer>
<developer>
<id>MasseGuillaume</id>
<name>Guillaume Massé</name>
<email>[email protected]</email>
</developer>
</developers>
)
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
addSbtPlugin("org.scalaexercises" % "sbt-exercise" % "0.0.0-SNAPSHOT", "0.13", "2.10")
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.0.0-SNAPSHOT", "0.13", "2.10")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")