Skip to content

Commit

Permalink
with sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
om committed Jun 16, 2017
1 parent 54f88a0 commit 6ca336b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 42 deletions.
51 changes: 9 additions & 42 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import sbt.Keys._

val buildSettings = Defaults.coreDefaultSettings ++ Seq(
organization:="com.github.a2mz",
name := "microspark",
version := "1.2",
// version := "1.3",
version in ThisBuild := "$releaseVersion",
scalacOptions ++= Seq(),
scalaVersion := "2.12.2",
crossScalaVersions := Seq("2.12.2", "2.11.10"),
scalaVersion in ThisBuild := "2.12.2",
crossScalaVersions in ThisBuild := Seq("2.12.2", "2.11.10"),
publishMavenStyle := true,
libraryDependencies ++= {
val akkaVersion = "10.0.7"
Expand All @@ -23,47 +25,12 @@ val buildSettings = Defaults.coreDefaultSettings ++ Seq(
"-deprecation")
)

lazy val publishSettings = Seq(
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
))

//lazy val publishSettings = Seq(
// pomExtra := (
// <url>https://github.com/a2mz/microspark</url>
// <licenses>
// <license>
// <name>Apache 2.0</name>
// <url>http://www.apache.org/licenses/</url>
// <distribution>repo</distribution>
// </license>
// </licenses>
// <scm>
// <url>[email protected]:a2mz/microspark.git</url>
// <connection>scm:[email protected]:a2mz/microspark.git</connection>
// </scm>
// <developers>
//
// <developer>
// <id>om</id>
// <name>Morozov Oleksandr</name>
// <url>https://www.linkedin.com/in/oleksandr-morozov-77281711/</url>
// </developer>
// </developers>
// ),
// publishTo := {
// val nexus = "https://oss.sonatype.org/"
// if (version.value.toLowerCase.endsWith("snapshot"))
// Some("snapshots" at nexus + "content/repositories/snapshots")
// else
// Some("staging" at nexus + "service/local/staging/deploy/maven2")
// }
//)


lazy val root = project
.in(file("."))
.settings(buildSettings)
.settings(publishSettings)



1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.5")
24 changes: 24 additions & 0 deletions sonatype.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,28 @@ scmInfo := Some(
)
developers := List(
Developer(id="om", name="Morozov Oleksandr", email="[email protected]", url=url("https://github.com/a2mz"))
)
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
)

//addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.5")
import ReleaseTransformations._

releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _), enableCrossBuild = true),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _), enableCrossBuild = true),
pushChanges
)

0 comments on commit 6ca336b

Please sign in to comment.