getting start scala
with eclispe, gradle
2014.04 ..
darkandark90@gmail.com
scala download
이미지
클릭
gradle 을 이용한 프로젝트 구성
Build.gradle for scala
• ['scala','eclipse','idea'].each{
• apply plugin: it
• }
• [compileScala, compileTestScala]*.options*.encoding = 'UTF-8'
• repositories {
• jcenter()
• }
• buildDir = 'build'
• dependencies {
• // We use Scala 2.11 in our library project
• compile 'org.scala-lang:scala-library:2.11.5'
• // We use Scalatest for testing our library
• testCompile 'junit:junit:4.12'
• testCompile 'org.scalatest:scalatest_2.11:2.2.4'
• testRuntime 'org.scala-lang.modules:scala-xml_2.11:1.0.3'
• }
• tasks.withType(ScalaCompile){
• scalaCompileOptions.useAnt = false
• }
• eclipse{
• classpath {
• downloadSources = true
• defaultOutputDir = file("${buildDir}/classes/main")
• }
• }
• idea{
• module{
• downloadSources = true
• downloadJavadoc = false
• inheritOutputDirs = false
• outputDir = file("${buildDir}/classes/main")
eclipse plugin 설치
scala IDE for Eclipse 3.0.2 선택
confirm 클릭 후
accept 체크 설치 진행
restart
Scala perspective
Hello Scala
Hello Scala
object HelloWorld {
def main(args: Array[String]){
println("Hello, world")
}
}
Hello Scala

Scala quick start

  • 1.
    getting start scala witheclispe, gradle 2014.04 .. darkandark90@gmail.com
  • 2.
  • 3.
    gradle 을 이용한프로젝트 구성
  • 4.
    Build.gradle for scala •['scala','eclipse','idea'].each{ • apply plugin: it • } • [compileScala, compileTestScala]*.options*.encoding = 'UTF-8' • repositories { • jcenter() • } • buildDir = 'build' • dependencies { • // We use Scala 2.11 in our library project • compile 'org.scala-lang:scala-library:2.11.5' • // We use Scalatest for testing our library • testCompile 'junit:junit:4.12' • testCompile 'org.scalatest:scalatest_2.11:2.2.4' • testRuntime 'org.scala-lang.modules:scala-xml_2.11:1.0.3' • } • tasks.withType(ScalaCompile){ • scalaCompileOptions.useAnt = false • } • eclipse{ • classpath { • downloadSources = true • defaultOutputDir = file("${buildDir}/classes/main") • } • } • idea{ • module{ • downloadSources = true • downloadJavadoc = false • inheritOutputDirs = false • outputDir = file("${buildDir}/classes/main")
  • 5.
    eclipse plugin 설치 scalaIDE for Eclipse 3.0.2 선택 confirm 클릭 후 accept 체크 설치 진행
  • 6.
  • 7.
  • 8.
  • 9.
    Hello Scala object HelloWorld{ def main(args: Array[String]){ println("Hello, world") } }
  • 10.