Skip to content

Commit

Permalink
Add publish info and update the README
Browse files Browse the repository at this point in the history
  • Loading branch information
akozhemiakin committed Apr 12, 2016
1 parent ef21437 commit 6fab934
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Expand Up @@ -19,13 +19,16 @@ Quick facts

Installation
------------
It is not yet published to the maven central (it will be soon). For now you can git clone the repository and publish it locally (sbt publishLocal). Then depend on it in your project:
This project is published at Maven Central. However, there is no release version yet. To depend on the *SNAPSHOT* version use the following sbt snippet:

```scala
resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies ++= Seq(
"ru.arkoit" %% "cableguy-core" % "0.1.0-SNAPSHOT"
)
```
For now this project is compatible only with scala 2.11.\*. For now there is no final decision whether it's worth to support scala 2.10.\*.
For now this project is compatible only with scala 2.11.\*. There is no final decision whether it's worth to support scala 2.10.\*.

Just-In-Time resolution
-----------------------
Expand Down
37 changes: 36 additions & 1 deletion build.sbt
Expand Up @@ -14,10 +14,45 @@ lazy val commonSettings = Seq(
scalacOptions ++= Seq("-feature", "-language:implicitConversions")
)

lazy val allSettings = commonSettings
lazy val noPublish = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)

lazy val publishSettings = Seq(
publishMavenStyle := true,
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")
},
pomIncludeRepository := { _ => false },
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("https://github.com/akozhemiakin/cableguy")),
scmInfo := Some(
ScmInfo(
url("https://github.com/akozhemiakin/cableguy"),
"scm:git:git@github.com:akozhemiakin/cableguy.git"
)
),
pomExtra := (
<developers>
<developer>
<id>akozhemiakin</id>
<name>Artyom Kozhemiakin</name>
<url>http://arkoit.ru</url>
</developer>
</developers>)
)

lazy val allSettings = commonSettings ++ publishSettings

lazy val root = (project in file("."))
.settings(allSettings)
.settings(noPublish)
.aggregate(core)

lazy val core = project
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Expand Up @@ -2,3 +2,5 @@ logLevel := Level.Warn

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")

0 comments on commit 6fab934

Please sign in to comment.