-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
71 lines (58 loc) · 2.26 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
lazy val commonSettings = Seq(
shellPrompt := { s => Project.extract(s).currentProject.id + " > " },
version := "0.1",
organization := "com.github.israel",
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")
},
publishMavenStyle := true,
publishArtifact in Test := false,
publishArtifact in (Compile, packageSrc) := true,
publishArtifact in (Compile, packageDoc) := true,
pomIncludeRepository := { x => false },
homepage := Some(url("http://github.com/israel/sbt-kafka-plugin")),
licenses := Seq("The MIT License (MIT)" -> url("http://opensource.org/licenses/MIT")),
pomExtra := (
<scm>
<connection>scm:git:git@github.com:israel/sbt-zookeeper-plugin.git</connection>
<developerConnection>scm:git:git@github.com:israel/sbt-zookeeper-plugin.git</developerConnection>
<url>https://github.com/israel/sbt-zookeeper-plugin</url>
</scm>
<developers>
<developer>
<name>Israel Klein</name>
<email>israel.klein@gmail.com</email>
</developer>
</developers>
)
)
val resourcesProjectName = "sbt-zookeeper-plugin-resources"
lazy val root = (project in file(".")).
settings(commonSettings : _*).
settings(
name := "sbt-zookeeper-plugin",
sbtPlugin := true,
sourceGenerators in Compile += task[Seq[File]] {
val file = (sourceManaged in Compile).value / "com" / "github" / "israel" / "sbt" / "zookeeper" / "BuildUtils.scala"
IO.write(file,
s"""
|package com.github.israel.sbt.zookeeper
|
|object ZookeeperPluginMeta {
| val pluginVersion = "${version.value}"
| val pluginSbtVersion = "${sbtVersion.value}"
| val pluginArtifactId = "${name.value}"
| val resourcesArtifactId = "${resourcesProjectName}_${scalaBinaryVersion.value}"
| val pluginGroupId = "${organization.value}"
|}
""".stripMargin)
Seq(file)
}
).aggregate(resources)
lazy val resources = (project in file("./resources")).
settings(commonSettings : _*).
settings(
name := resourcesProjectName
)