forked from hanabix/config-annotation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
66 lines (60 loc) · 2.16 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
lazy val root = (project in file("."))
.settings(basicSettings: _*)
.settings(dependencySettings: _*)
.settings(publishSettings: _*)
.settings(releaseSettings: _*)
.settings(addCompilerPlugin("org.scalamacros" % "paradise" % "2.0.1" cross CrossVersion.full))
lazy val basicSettings = Seq(
name := "config-annotation",
organization := "com.github.eagoo",
scalaVersion := "2.11.5",
scalacOptions += "-encoding",
scalacOptions += "utf8",
scalacOptions += "-feature",
scalacOptions += "-unchecked",
scalacOptions += "-deprecation",
scalacOptions += "-Xmacro-settings:conf.output.dir=src/test/resources",
scalacOptions += "-language:_"
)
lazy val dependencySettings = Seq(
libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-reflect" % _),
libraryDependencies += "com.typesafe" % "config" % "1.2.1",
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.1" % "test"
)
lazy val publishSettings = Seq(
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { (repo: MavenRepository) => false},
pomExtra := pomXml) ++ xerial.sbt.Sonatype.sonatypeSettings
lazy val pomXml = {
<url>https://github.com/eagoo/config-annotation</url>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:eagoo/config-annotation.git</url>
<connection>scm:git:[email protected]:eagoo/config-annotation.git</connection>
</scm>
<developers>
<developer>
<id>eagoo</id>
<name>eagooqi</name>
<url>http://github.com/eagoo</url>
</developer>
</developers>
}
lazy val releaseSettings = sbtrelease.ReleasePlugin.releaseSettings ++ Seq(
sbtrelease.ReleasePlugin.ReleaseKeys.publishArtifactsAction := PgpKeys.publishSigned.value
)
// sbt release sonatypeRelease