Skip to content

Commit 7c26445

Browse files
committed
Create README.md
1 parent c526ce5 commit 7c26445

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
scala-xml
2+
=========
3+
4+
The standard Scala XML library.
5+
6+
As of Scala 2.11, this library is a separate jar that can be omitted from Scala projects that do not use XML.
7+
We're also looking forward to alternative implementations!
8+
9+
## Adding an SBT dependency
10+
To depend on scala-xml in SBT, add something like this to your build.sbt:
11+
12+
```
13+
libraryDependencies += "org.scala-lang" %% "scala-xml" % "1.0-RC1"
14+
```
15+
16+
(Assuming you're using a `scalaVersion` for which a scala-xml is published.
17+
The first 2.11 milestone for which this is true is 2.11.0-M4.)
18+
19+
To support multiple Scala versions:
20+
21+
- SBT 0.12:
22+
```
23+
libraryDependencies <++= (scalaVersion) { sVer =>
24+
if (sVer startsWith "2.11") Seq("org.scala-lang" %% "scala-xml" % "1.0-RC1")
25+
else Seq.empty
26+
}
27+
```
28+
29+
- SBT 0.13:
30+
```
31+
libraryDependencies ++= (
32+
if (scalaVersion.value startsWith "2.11") Seq("org.scala-lang" %% "scala-xml" % "1.0-RC1")
33+
else Seq.empty
34+
)
35+
```

0 commit comments

Comments
 (0)