Skip to content

Commit

Permalink
Merge pull request #20 from SethTisue/fat-jar-fixes
Browse files Browse the repository at this point in the history
version 0.1.2
  • Loading branch information
SethTisue committed Jan 12, 2016
2 parents ac92653 + c0429ae commit c694bf4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015, Typesafe Inc.
Copyright (c) 2015-2016, Typesafe Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ incremental recompile times.

## Building the plugin from source

`sbt assembly` will create `target/scala-2.11/scala-sculpt_2.11-0.1.1.jar`.
`sbt assembly` will create `target/scala-2.11/scala-sculpt_2.11-0.1.2.jar`.
(The JAR is a fat JAR that bundles its dependency on spray-json.)

## Using the plugin

You can use the compiled plugin with the Scala 2.11 compiler as follows.

Supposing you have `scala-sculpt_2.11-0.1.1.jar` in your current working directory,
Supposing you have `scala-sculpt_2.11-0.1.2.jar` in your current working directory,

Then you can do e.g.:

scalac -Xplugin:scala-sculpt_2.11-0.1.1.jar \
scalac -Xplugin:scala-sculpt_2.11-0.1.2.jar \
-Xplugin-require:sculpt \
-P:sculpt:out=dep.json \
Dep.scala
Expand Down Expand Up @@ -123,7 +123,7 @@ manipulation, e.g. in the REPL.

Now in a Scala 2.11 REPL with the same JARs on the classpath:

scala -classpath scala-sculpt_2.11-0.1.1.jar
scala -classpath scala-sculpt_2.11-0.1.2.jar

If we load `dep.json` as follows, we'll see the following graph:

Expand Down
13 changes: 8 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (C) 2015 Typesafe Inc. <http://typesafe.com>
// Copyright (C) 2015-2016 Typesafe Inc. <http://typesafe.com>

organization := "com.typesafe"
name := "scala-sculpt"
version := "0.1.1"
version := "0.1.2"
licenses := Seq("Apache License v2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
homepage := Some(url("http://github.com/typesafehub/scala-sculpt"))

Expand Down Expand Up @@ -30,9 +30,12 @@ scalacOptions ++= Seq(
assemblyJarName in assembly :=
s"${name.value}_${scalaBinaryVersion.value}-${version.value}.jar"

mappings in (Compile, packageBin) ++= Seq(
(baseDirectory.value / "README.md") -> "README.md",
(baseDirectory.value / "LICENSE.md") -> "LICENSE.md")
assemblyOption in assembly :=
(assemblyOption in assembly).value.copy(includeScala = false)

unmanagedResources in Compile ++=
Seq("README.md", "LICENSE.md")
.map(baseDirectory.value / _)

pomExtra := (<scm>
<url>https://github.com/typesafehub/scala-sculpt.git</url>
Expand Down

0 comments on commit c694bf4

Please sign in to comment.