-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.sbt
42 lines (30 loc) · 1.21 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
sbtPlugin := true
organization := "com.typesafe.sbt"
name := "sbt-coffeescript-plugin"
version := "0.1-SNAPSHOT"
scalaVersion := "2.10.3"
scalacOptions += "-feature"
resolvers ++= Seq(
"Typesafe Releases Repository" at "http://repo.typesafe.com/typesafe/releases/",
Resolver.url("sbt snapshot plugins", url("http://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots"))(Resolver.ivyStylePatterns),
Resolver.sonatypeRepo("snapshots"),
"Typesafe Snapshots Repository" at "http://repo.typesafe.com/typesafe/snapshots/"
)
libraryDependencies ++= Seq(
"org.webjars" % "coffee-script" % "1.6.3",
"org.specs2" %% "specs2" % "2.3.7" % "test",
"junit" % "junit" % "4.11" % "test"
)
addSbtPlugin("com.typesafe.sbt" % "sbt-js-engine" % "1.0.0-SNAPSHOT")
scriptedSettings
scriptedLaunchOpts <+= version apply { v => s"-Dproject.version=$v" }
publishMavenStyle := false
publishTo := {
val isSnapshot = version.value.contains("-SNAPSHOT")
val scalasbt = "http://repo.scala-sbt.org/scalasbt/"
val (name, url) = if (isSnapshot)
("sbt-plugin-snapshots", scalasbt + "sbt-plugin-snapshots")
else
("sbt-plugin-releases", scalasbt + "sbt-plugin-releases")
Some(Resolver.url(name, new URL(url))(Resolver.ivyStylePatterns))
}