|
2 | 2 |
|
3 | 3 | [](https://travis-ci.org/lunduniversity/introprog-scalalib)
|
4 | 4 |
|
5 |
| -Library with Scala utilities for Computer Science teaching. The library is maintained by Björn Regnell at Lund University, Sweden. Contributions are welcome! For further information see: https://github.com/lunduniversity/introprog |
| 5 | +This is a library with Scala utilities for Computer Science teaching. The library is maintained by Björn Regnell at Lund University, Sweden. Contributions are welcome! |
| 6 | + |
| 7 | +The api documentation is available here: http://cs.lth.se/pgk/api/ |
| 8 | + |
| 9 | +Se also: http://cs.lth.se/pgk and https://github.com/lunduniversity/introprog |
| 10 | + |
| 11 | + |
| 12 | +# Manual download |
| 13 | + |
| 14 | +Download the latest jar-file from here: https://github.com/lunduniversity/introprog-scalalib/releases |
| 15 | + |
| 16 | +Put the jar-file on your classpath when you run the Scala REPL, for example: |
| 17 | +``` |
| 18 | +> scala -cp introprog_2.12-0.1.5.jar |
| 19 | +scala> val w = new introprog.PixelWindow() |
| 20 | +scala> w.fill(100,100,100,100,java.awt.Color.red) |
| 21 | +scala> |
| 22 | +``` |
| 23 | +Put the jar-file on your classpath when you run your Scala app, for example: |
| 24 | +``` |
| 25 | +> scala -cp "introprog_2.12-0.1.5.jar:." Main |
| 26 | +``` |
| 27 | +If on Windows cmd/powershell use `;` instead of ´:´. |
| 28 | + |
| 29 | +# Using sbt |
| 30 | + |
| 31 | +If you have the [Scala Build Tool](https://www.scala-sbt.org/download.html) then you can put this text in a file called `build.sbt` |
| 32 | +``` |
| 33 | +scalaVersion := "2.12.6" |
| 34 | +libraryDependencies += "se.lth.cs" %% "introprog" % "0.1.5" |
| 35 | +``` |
| 36 | + |
| 37 | +When you run `sbt` in terminal the introprog lib is automatically downloaded and made available on your classpath. |
| 38 | +You can do things like: |
| 39 | +``` |
| 40 | +> sbt |
| 41 | +sbt> console |
| 42 | +scala> val w = new introprog.PixelWindow() |
| 43 | +scala> w.fill(100,100,100,100,java.awt.Color.red) |
| 44 | +``` |
0 commit comments