Scala projects with SBT

666 views
548 views

Published on

SBT is a small jar file that provides everything you need to bootstrap your scala projects. Combining its modular design with the projects template tool giter8, you'll get all you need to start your scala voyage.

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
666
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Scala projects with SBT

  1. 1. Scala projects with sbtJos´e Miguel Mart´ınez CarrascoSpringerMay 24, 2013
  2. 2. 1 IntroductionMotivation2 SetuprequisitessbtREPLTDDgiter8conscript3 Usagetemplatespublish4 References
  3. 3. context New technology, new tools, too many options.target Simple and working solution.
  4. 4. 1 IntroductionMotivation2 SetuprequisitessbtREPLTDDgiter8conscript3 Usagetemplatespublish4 References
  5. 5. Everything under $HOME/bin!!!
  6. 6. • git• github account• unix
  7. 7. 1 #!/bin/sh2 java -Xmx1024M -jar ‘dirname$0‘/sbt-latest/sbt-launch.jar "$@"[1]
  8. 8. 1 sbt console23 scala>[1]
  9. 9. 1 // src/test/scala/SetSpec.scala2 package com.jm2dev.usingscalatest34 import org.scalatest.FunSpec56 class SetSpec extends FunSpec {7 describe("A Set") {8 describe("when empty") {9 it("should have size 0") {10 assert(Set.empty.size === 0)11 }1213 it("should produce NoSuchElementException when headis invoked") {14 intercept[NoSuchElementException] {15 Set.empty.head16 }17 }18 }19 }20 }
  10. 10. Giter8 is a command line tool to generate files and directories fromtemplates published on github. It’s implemented in Scala and runsthrough the Simple Build Tool launcher, but it can produce outputfor any purpose. [2]
  11. 11. Conscript is a tool for installing and updating Scala softwareprograms. [3]1 curl https://raw.github.com/n8han/conscript/master/ 2 setup.sh | sh34 cs n8han/giter8
  12. 12. 1 IntroductionMotivation2 SetuprequisitessbtREPLTDDgiter8conscript3 Usagetemplatespublish4 References
  13. 13. Any github repository with g8 suffix.1 g8 softprops/unfiltered
  14. 14. Publish your template as yourtemplate.g8 to github and updategiter8 wiki [4].
  15. 15. http://www.scala-sbt.org/release/docs/Community/Community-Plugins.html
  16. 16. 1 IntroductionMotivation2 SetuprequisitessbtREPLTDDgiter8conscript3 Usagetemplatespublish4 References
  17. 17. http://www.scala-sbt.orghttps://github.com/n8han/giter8https://github.com/n8han/conscripthttps://github.com/n8han/giter8/wiki/giter8-templates
  18. 18. 1 IntroductionMotivation2 SetuprequisitessbtREPLTDDgiter8conscript3 Usagetemplatespublish4 References

×