From 66a3dde9013065e62e871d21d78286eeadc87430 Mon Sep 17 00:00:00 2001 From: Rafa Paradela Date: Tue, 7 Jun 2016 00:48:19 +0200 Subject: [PATCH 1/5] Adds settings for distributing projects in Sonatype --- build.sbt | 52 ++++++++++++++++++++++++++++++++++++++++----- project/plugins.sbt | 3 ++- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 78277ed2..c72aacdf 100644 --- a/build.sbt +++ b/build.sbt @@ -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 := + + + 47 Degrees (twitter: @47deg) + hello@47deg.com + + + Guillaume Massé + masgui@gmail.com + + +) \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 640122b1..31d193a8 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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") From 4f8a16c423653834bd40dac4ac63cfcecd90a56c Mon Sep 17 00:00:00 2001 From: Rafa Paradela Date: Tue, 7 Jun 2016 01:23:51 +0200 Subject: [PATCH 2/5] Change SNAPSHOT version --- build.sbt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index c72aacdf..db1dbc36 100644 --- a/build.sbt +++ b/build.sbt @@ -5,15 +5,15 @@ lazy val stdlib = (project in file(".")) organization := "org.scala-exercises", name := "content-stdlib", scalaVersion := "2.11.7", - version := "0.0.1", + version := "0.0.0-SNAPSHOT", resolvers ++= Seq( Resolver.sonatypeRepo("snapshots") ), libraryDependencies ++= Seq( "com.chuusai" %% "shapeless" % "2.2.5", "org.scalatest" %% "scalatest" % "2.2.4", - "org.scala-exercises" %% "runtime" % "0.0.1" changing(), - "org.scala-exercises" %% "definitions" % "0.0.1" 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" ), From 326fbfd2f1b3b90c5bebd416779e05c1b4c35bd5 Mon Sep 17 00:00:00 2001 From: Rafa Paradela Date: Tue, 7 Jun 2016 01:25:01 +0200 Subject: [PATCH 3/5] Change SNAPSHOT version also in sbt-exercise plugin --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 31d193a8..f5a296bd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,2 @@ -addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.0.1", "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") From 67415081bf0bb73b3db09c5a8660d28775b04b82 Mon Sep 17 00:00:00 2001 From: Rafa Paradela Date: Tue, 7 Jun 2016 01:44:34 +0200 Subject: [PATCH 4/5] Added `id` to developers based on https://maven.apache.org/pom.html#Developers --- build.sbt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index db1dbc36..f2afe393 100644 --- a/build.sbt +++ b/build.sbt @@ -50,10 +50,22 @@ lazy val publishSettings = Seq( pomExtra := - 47 Degrees (twitter: @47deg) - hello@47deg.com + raulraja + Raul Raja + raul@47deg.com + dialelo + Alejandro Gómez + al.g.g@47deg.com + + + rafaparadela + Rafa Paradela + rafaparadela@47deg.com + + + MasseGuillaume Guillaume Massé masgui@gmail.com From ef03433728c931c39b856639570a09c88d32d3d5 Mon Sep 17 00:00:00 2001 From: Rafa Paradela Date: Tue, 7 Jun 2016 01:49:47 +0200 Subject: [PATCH 5/5] Fix a typo in my email --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f2afe393..69ff4171 100644 --- a/build.sbt +++ b/build.sbt @@ -62,7 +62,7 @@ lazy val publishSettings = Seq( rafaparadela Rafa Paradela - rafaparadela@47deg.com + rafa.p@47deg.com MasseGuillaume