diff --git a/build.sbt b/build.sbt index cb9578f..bbb7167 100644 --- a/build.sbt +++ b/build.sbt @@ -5,21 +5,14 @@ homepage := Some(url("https://github.com/circe/circe-config")) licenses += "Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html") apiURL := Some(url("https://circe.github.io/circe-config/api/")) -crossScalaVersions := Seq("2.11.11", "2.12.3") -scalaVersion := crossScalaVersions.value.last - enablePlugins(GitPlugin) versionWithGit git.useGitDescribe := true - -enablePlugins(BintrayPlugin) -bintrayRepository := "maven" -bintrayOrganization := Some("fonseca") -publishArtifact in Test := false -publishMavenStyle := true +git.remoteRepo := "git@github.com:circe/circe-circe.git" enablePlugins(ReleasePlugin) releaseCrossBuild := true +releasePublishArtifactsAction := PgpKeys.publishSigned.value releaseTagName := (version in ThisBuild).value releaseVersionFile := target.value / "unused-version.sbt" releaseProcess := { @@ -34,7 +27,8 @@ releaseProcess := { setReleaseVersion, tagRelease, publishArtifacts, - pushChanges + pushChanges, + releaseStepTask(ghpagesPushSite) ) } @@ -57,7 +51,10 @@ libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % Versions.scalaTest % Test ) +enablePlugins(GhpagesPlugin, SiteScaladocPlugin) autoAPIMappings := true +ghpagesNoJekyll := true +siteSubdirName in SiteScaladoc := "api" doctestTestFramework := DoctestTestFramework.ScalaTest doctestMarkdownEnabled := true doctestWithDependencies := false @@ -85,6 +82,28 @@ scalacOptions ++= Seq( scalacOptions in (Compile, console) ~= { _.filterNot(Set("-Ywarn-unused-import")) } scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value +publishMavenStyle := true +publishArtifact in Test := false +pomIncludeRepository := { _ => 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") +} +credentials ++= ( + for { + username <- Option(System.getenv().get("SONATYPE_USERNAME")) + password <- Option(System.getenv().get("SONATYPE_PASSWORD")) + } yield Credentials( + "Sonatype Nexus Repository Manager", + "oss.sonatype.org", + username, + password + ) +).toSeq + scmInfo := Some( ScmInfo( url("https://github.com/circe/circe-config"), diff --git a/project/plugins.sbt b/project/plugins.sbt index 2d34d78..b10ca50 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,8 @@ -addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") -addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.4") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5") +addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.0") +addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.5") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1") +addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3") +addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1") addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.5.0")