File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -15,19 +15,18 @@ incremental recompile times.
1515
1616## Building the plugin from source
1717
18- ` sbt package ` will create ` target/scala-2.11/scala-sculpt_2.11-0.1.0.jar ` .
18+ ` sbt assembly ` will create ` target/scala-2.11/scala-sculpt_2.11-0.1.1.jar ` .
19+ (The JAR is a fat JAR that bundles its dependency on spray-json.)
1920
2021## Using the plugin
2122
2223You can use the compiled plugin with the Scala 2.11 compiler as follows.
2324
24- Supposing you have ` scala-sculpt_2.11-0.1.0.jar ` in your current working directory,
25- along with ` spray-json_2.11-1.3.2.jar ` (which you can download
26- [ here] ( http://repo1.maven.org/maven2/io/spray/spray-json_2.11/1.3.2/spray-json_2.11-1.3.2.jar ) .
25+ Supposing you have ` scala-sculpt_2.11-0.1.1.jar ` in your current working directory,
2726
2827Then you can do e.g.:
2928
30- scalac -Xplugin:scala-sculpt_2.11-0.1.0.jar:spray-json_2.11-1.3.2 .jar \
29+ scalac -Xplugin:scala-sculpt_2.11-0.1.1 .jar \
3130 -Xplugin-require:sculpt \
3231 -P:sculpt:out=dep.json \
3332 Dep.scala
@@ -124,7 +123,7 @@ manipulation, e.g. in the REPL.
124123
125124Now in a Scala 2.11 REPL with the same JARs on the classpath:
126125
127- scala -classpath scala-sculpt_2.11-0.1.0.jar:spray-json_2.11-1.3.2 .jar
126+ scala -classpath scala-sculpt_2.11-0.1.1 .jar
128127
129128If we load ` dep.json ` as follows, we'll see the following graph:
130129
Original file line number Diff line number Diff line change 22
33organization := " com.typesafe"
44name := " scala-sculpt"
5- version := " 0.1.0 "
5+ version := " 0.1.1 "
66licenses := Seq (" Apache License v2.0" -> url(" http://www.apache.org/licenses/LICENSE-2.0" ))
77homepage := Some (url(" http://github.com/typesafehub/scala-sculpt" ))
88
@@ -24,6 +24,12 @@ scalacOptions ++= Seq(
2424 " -Xfatal-warnings"
2525)
2626
27+ // generate same JAR name as `package` would:
28+ // - don't append "-assembly"; see issue #18
29+ // - and do include the "_2.11", don't know why assembly removes that by default
30+ assemblyJarName in assembly :=
31+ s " ${name.value}_ ${scalaBinaryVersion.value}- ${version.value}.jar "
32+
2733mappings in (Compile , packageBin) ++= Seq (
2834 (baseDirectory.value / " README.md" ) -> " README.md" ,
2935 (baseDirectory.value / " LICENSE.md" ) -> " LICENSE.md" )
Original file line number Diff line number Diff line change 1+ addSbtPlugin(" com.eed3si9n" % " sbt-assembly" % " 0.14.1" )
You can’t perform that action at this time.
0 commit comments