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 1 commit
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
Next Next commit
Adds settings for distributing projects in Sonatype
  • Loading branch information
Rafa Paradela committed Jun 6, 2016
commit 66a3dde9013065e62e871d21d78286eeadc87430
52 changes: 47 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,19 +1,61 @@
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",
version := "0.0.1",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
),
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.1" changing(),
"org.scala-exercises" %% "definitions" % "0.0.1" 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>
<name>47 Degrees (twitter: @47deg)</name>
<email>hello@47deg.com</email>
</developer>
<developer>
<name>Guillaume Massé</name>
<email>masgui@gmail.com</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.1", "0.13", "2.10")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")