-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
92 lines (74 loc) · 2.25 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import sbt._
import Keys._
import sbt.Extracted
import sbtrelease.ReleasePlugin._
import sbtrelease._
import ReleaseStateTransformations._
import sbtrelease.ReleasePlugin.ReleaseKeys._
import Utilities._
import com.typesafe.sbt.pgp.PgpKeys.publishSigned
sbtPlugin := true
organization := "info.schleichardt"
name := "sbt-sonar"
//version is in version.sbt and generated by sbt-release
scalacOptions ++= List(
"-unchecked",
"-deprecation",
"-Xlint"
)
libraryDependencies += "org.codehaus.sonar.runner" % "sonar-runner-dist" % "2.3"
scalariformSettings
CrossBuilding.scriptedSettings
crossBuildingSettings
CrossBuilding.crossSbtVersions := Seq("0.11.3", "0.12", "0.13")
javacOptions ++= Seq("-source", "1.6", "-target", "1.6")
publishMavenStyle := true
publishArtifact in Test := false
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
pomIncludeRepository := { _ => false }
pomExtra := (
<url>https://github.com/schleichardt/sbt-sonar</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:schleichardt/sbt-sonar.git</url>
<connection>scm:git:[email protected]:schleichardt/sbt-sonar.git</connection>
</scm>
<developers>
<developer>
<id>schleichardt</id>
<name>Michael Schleichardt</name>
<url>http://michael.schleichardt.info</url>
</developer>
</developers>
)
releaseSettings
sbtrelease.ReleasePlugin.ReleaseKeys.releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts.copy(action = { st: State =>
import scala.sys.process._
if("./sbt-cross.sh publish-signed".! != 0)
throw new java.io.IOException("could not publish artifacts.")
st
}),
setNextVersion,
commitNextVersion,
pushChanges
)