-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.sbt
More file actions
154 lines (103 loc) · 4.7 KB
/
build.sbt
File metadata and controls
154 lines (103 loc) · 4.7 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import sqlshell.build.defs._
// ---------------------------------------------------------------------------
// Basic settings
name := "SQLShell"
version := "0.8.0"
organization := "org.clapper"
scalaVersion := "2.9.1"
// ---------------------------------------------------------------------------
// Additional compiler options and plugins
scalacOptions ++= Seq("-P:continuations:enable", "-deprecation", "-unchecked")
autoCompilerPlugins := true
libraryDependencies <<= (scalaVersion, libraryDependencies) { (ver, deps) =>
deps :+ compilerPlugin("org.scala-lang.plugins" % "continuations" % ver)
}
// ---------------------------------------------------------------------------
// Local settings. See project/defs.scala
seq(sqlshell.build.defs.sqlshellSettings: _*)
// Ensure that the about info properties file is built before packaging.
packageBin in Compile <<=
(packageBin in Compile).dependsOn(aboutInfo in SQLShell)
// ---------------------------------------------------------------------------
// SBT LWM
seq(org.clapper.sbt.lwm.LWM.lwmSettings: _*)
LWM.sourceFiles in LWM.Config <++= baseDirectory { d =>
(d / "src" / "docs" ** "*.md").get
}
LWM.sourceFiles in LWM.Config <++= baseDirectory { d => (d / "README.md").get ++
(d / "LICENSE.md").get ++
(d / "FAQ.md").get }
LWM.targetDirectory in LWM.Config <<= baseDirectory(_ / "target" / "docs")
LWM.cssFile in LWM.Config <<=
baseDirectory(d => Some(d / "src" / "docs" / "markdown.css"))
LWM.flatten in LWM.Config := true
LWM.encoding in LWM.Config := "ISO-8859-1"
doc in Compile <<= (doc in Compile).dependsOn(
LWM.translate in LWM.Config
)
// ---------------------------------------------------------------------------
// IzPack
seq(org.clapper.sbt.izpack.IzPack.izPackSettings: _*)
IzPack.installSourceDir in IzPack.Config <<=
baseDirectory(_ / "src" / "main" / "izpack")
IzPack.configFile in IzPack.Config <<=
(IzPack.installSourceDir in IzPack.Config) (_ / "install.yml")
IzPack.variables in IzPack.Config += ("toolName", "SQLShell")
IzPack.variables in IzPack.Config <++= baseDirectory {bd =>
Seq(("targetDocDir", (bd / "target" / "docs").toString),
("targetDir", (bd / "target").toString))
}
IzPack.variables in IzPack.Config <+=
(baseDirectory, scalaVersion, version) { (bd, sv, v) =>
("sqlshellJar", (bd / "target" / ("scala_" + sv) /
("sqlshell_%s-%s.jar" format (sv, v))).toString)
}
IzPack.createXML in IzPack.Config <<=
(IzPack.createXML in IzPack.Config).dependsOn(doc in Compile)
// ---------------------------------------------------------------------------
// Pamflet
seq(org.clapper.sbt.pamflet.PamfletPlugin.pamfletSettings: _*)
sourceDirectories in Pamflet <<= baseDirectory(bd =>
Seq(bd / "src" / "docs" / "users-guide")
)
logLevel in Pamflet := Level.Debug
// Force an edit of the pamflet template properties file, to substitute
// variables.
generate in Pamflet <<= (generate in Pamflet).dependsOn(
EditSource.edit in EditSource.Config
)
// ---------------------------------------------------------------------------
// Edit Source settings. Only used to preprocess Pamflet stuff.
seq(org.clapper.sbt.editsource.EditSource.editSourceSettings: _*)
EditSource.sourceFiles in EditSource.Config <+= baseDirectory(
_ / "src" / "docs" / "pamflet-template.properties"
)
EditSource.targetDirectory in EditSource.Config <<= baseDirectory(
_ / "src" / "docs" / "users-guide"
)
EditSource.flatten in EditSource.Config := true
EditSource.variables in EditSource.Config <+= name {name => ("name", name)}
EditSource.variables in EditSource.Config <+=
version {version => ("version", version)}
// ---------------------------------------------------------------------------
// Other dependendencies
libraryDependencies ++= Seq(
"jline" % "jline" % "0.9.94",
"org.clapper" %% "grizzled-scala" % "1.0.9",
"org.clapper" %% "argot" % "0.3.5",
"org.joda" % "joda-convert" % "1.1",
"joda-time" % "joda-time" % "2.0",
"org.scala-tools.time" %% "time" % "0.5",
"net.sf.opencsv" % "opencsv" % "2.0"
)
libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-library" % _)
// ---------------------------------------------------------------------------
// Publishing criteria
publishTo <<= version {(v: String) =>
val nexus = "http://nexus.scala-tools.org/content/repositories/"
if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "snapshots/")
else Some("releases" at nexus + "releases/")
}
publishMavenStyle := true
credentials += Credentials(Path.userHome / "src" / "mystuff" / "scala" /
"nexus.scala-tools.org.properties")