Skip to content

Commit e41f4fd

Browse files
committed
Build infrastructure
1 parent 0e8d0bb commit e41f4fd

File tree

7 files changed

+91
-13
lines changed

7 files changed

+91
-13
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
*.class
2+
*.log
3+
4+
# sbt specific
5+
dist/*
6+
target/
7+
lib_managed/
8+
src_managed/
9+
project/boot/
10+
project/plugins/project/
11+
project/local-plugins.sbt
12+
.history
13+
14+
# Scala-IDE specific
15+
.scala_dependencies
16+
.cache
17+
.classpath
18+
.project
19+
.settings
20+
bin/
21+
22+
# idea
23+
.idea
24+
.idea_modules

build.sbt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
12
name := "dotty"
23

3-
organization := "lamp"
4+
scalaVersion in Global := "2.11.0-M7"
45

5-
scalaVersion := "2.10.0"
6+
version in Global := "0.1-SNAPSHOT"
67

7-
scalaSource in Compile <<= baseDirectory / "src"
8+
organization in Global := "org.scala-lang"
89

9-
scalacOptions in Global ++= Seq("-feature", "-deprecation", "-language:_")
10+
organizationName in Global := "LAMP/EPFL"
1011

11-
libraryDependencies <+= scalaVersion ( sv => "org.scala-lang" % "scala-reflect" % sv )
12+
organizationHomepage in Global := Some(url("http://lamp.epfl.ch"))
1213

13-
scalaSource in Test <<= baseDirectory / "test"
14+
homepage in Global := Some(url("http://scala-lang.org"))

gitignore.SAMPLE

Lines changed: 0 additions & 5 deletions
This file was deleted.

project/Build.scala

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import sbt._
2+
import Keys._
3+
import Process._
4+
5+
object MiniboxingBuild extends Build {
6+
7+
val defaults = Defaults.defaultSettings ++ Seq(
8+
// set sources to src/, tests to test/ and resources to resources/
9+
scalaSource in Compile <<= baseDirectory(_ / "src"),
10+
javaSource in Compile <<= baseDirectory(_ / "src"),
11+
scalaSource in Test <<= baseDirectory(_ / "test"),
12+
javaSource in Test <<= baseDirectory(_ / "test"),
13+
resourceDirectory in Compile <<= baseDirectory(_ / "resources"),
14+
unmanagedSourceDirectories in Compile <<= (scalaSource in Compile)(Seq(_)),
15+
unmanagedSourceDirectories in Test <<= (scalaSource in Test)(Seq(_)),
16+
17+
// include sources in eclipse (downloads source code for all dependencies)
18+
//http://stackoverflow.com/questions/10472840/how-to-attach-sources-to-sbt-managed-dependencies-in-scala-ide#answer-11683728
19+
com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys.withSource := true,
20+
21+
// to get Scala 2.11
22+
resolvers += Resolver.sonatypeRepo("releases"),
23+
24+
// get reflect and xml onboard
25+
libraryDependencies ++= Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value,
26+
"org.scala-lang.modules" %% "scala-xml" % "1.0.0-RC7"),
27+
28+
// get junit onboard
29+
libraryDependencies += "com.novocode" % "junit-interface" % "0.9" % "test",
30+
31+
// scalac options
32+
scalacOptions in Global ++= Seq("-feature", "-deprecation", "-language:_"),
33+
34+
// main class
35+
mainClass in (Compile, run) := Some("dotty.tools.dotc.Main")
36+
)
37+
38+
lazy val dotty = Project(id = "miniboxing", base = file("."), settings = defaults)
39+
}

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.12.2
1+
sbt.version=0.13.0

project/plugins.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
// Add personal SBT plugins for IDEs, etc to `local-plugins.sbt`
22
//
33
// e.g. addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.1.0")
4+
5+
// Scala IDE project file generator
6+
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")

readme.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
dotty
22
=====
33

4-
The experimental compiler for a Scala dialect based on DOT
4+
The experimental compiler for a Scala dialect based on DOT.
5+
6+
### To get started:
7+
```
8+
sbt compile
9+
sbt run
10+
```
11+
The tests (`sbt test`) don''t work yet.
12+
13+
14+
### To use the Scala IDE:
15+
```
16+
sbt eclipse
17+
```
18+
Notes:
19+
* You will need the Scala IDE for 2.11.0-M7
20+
* There are 2 spurious version incompatibility warnings

0 commit comments

Comments
 (0)