fanscala1 3 sbt

390 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

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

No notes for slide

fanscala1 3 sbt

  1. 1. 初心者Scala in F@N 第一回初心者
  2. 2. scalasbtg8 sbt
  3. 3. org8 typesafehub/scala-sbt
  4. 4. Scala Project Using sbtorganization [org.example]:name [Scala Project]:scala_version [2.9.2]:version [0.1-SNAPSHOT]:Applied typesafehub/scala-sbt.g8 in scala-project とりあえず全部デフォルトでもいいです
  5. 5. % cd scala-project% sbt Sbtプロンプトが起動する& いろいろダウンロードし始めるので 最初の1回は時間がかかる
  6. 6. > compile →> run →> clean →> test →> reload →> console → REPL> help → help
  7. 7. ディレクトリ構成project XXXBuild.scalasrc main scala/org/example/XXX.scala java/XXXX Java testtarget
  8. 8. プロジェクト定義import sbt._import sbt.Keys._object ScalaProjectBuild extends Build { lazy val scalaProject = Project( id = "scala-project", base = file("."), settings = Project.defaultSettings ++ Seq( name := "Scala Project", organization := "org.example", version := "0.1-SNAPSHOT", scalaVersion := "2.9.2" // add other settings here ) )}
  9. 9. メインのソースpackage org.exampleobject ScalaProject extends App { println("Hello, Scala Project")}
  10. 10. scala-project ディレクトリの配下 % sbt > runHello, Scala Project

×