-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt.bak
77 lines (66 loc) · 3.07 KB
/
build.sbt.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name <<= submitProjectName(pname => "progfun-"+ pname)
version := "1.0.0"
scalaVersion := "2.10.1"
scalacOptions ++= Seq("-deprecation")
//libraryDependencies += "org.scalatest" %% "scalatest" % "1.8" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M5b" % "test"
libraryDependencies += "junit" % "junit" % "4.10" % "test"
// This setting defines the project to which a solution is submitted. When creating a
// handout, the 'createHandout' task will make sure that its value is correct.
submitProjectName := "objsets"
// See documentation in ProgFunBuild.scala
projectDetailsMap := Map(
"example" -> ProjectDetails(
packageName = "example",
assignmentPartId = "fTzFogNl",
assignmentPartIdNumber = 5,
maxScore = 10d,
styleScoreRatio = 0.2),
"recfun" -> ProjectDetails(
packageName = "recfun",
assignmentPartId = "3Rarn9Ki",
assignmentPartIdNumber = 7,
maxScore = 10d,
styleScoreRatio = 0.2),
"funsets" -> ProjectDetails(
packageName = "funsets",
assignmentPartId = "fBXOL6Qd",
assignmentPartIdNumber = 6,
maxScore = 10d,
styleScoreRatio = 0.2),
"objsets" -> ProjectDetails(
packageName = "objsets",
assignmentPartId = "95dMMEz7",
assignmentPartIdNumber = 12,
maxScore = 10d,
styleScoreRatio = 0.2)
)
// Files that we hand out to the students
handoutFiles <<= (baseDirectory, projectDetailsMap, commonSourcePackages) map { (basedir, detailsMap, commonSrcs) =>
(projectName: String) => {
val details = detailsMap.getOrElse(projectName, sys.error("Unknown project name: "+ projectName))
val commonFiles = (PathFinder.empty /: commonSrcs)((files, pkg) =>
files +++ (basedir / "src" / "main" / "scala" / pkg ** "*.scala")
)
(basedir / "src" / "main" / "scala" / details.packageName ** "*.scala") +++
commonFiles +++
(basedir / "src" / "test" / "scala" / details.packageName ** "*.scala") +++
(basedir / "build.sbt") +++
(basedir / "project" / "build.properties") +++
(basedir / "project" ** ("*.scala" || "*.sbt")) +++
(basedir / "project" / "scalastyle_config.xml") +++
(basedir / "lib_managed" ** "*.jar") +++
(basedir * (".classpath" || ".project")) +++
(basedir / ".settings" / "org.scala-ide.sdt.core.prefs")
}
}
// This setting allows to restrict the source files that are compiled and tested
// to one specific project. It should be either the empty string, in which case all
// projects are included, or one of the project names from the projectDetailsMap.
currentProject := ""
// Packages in src/main/scala that are used in every project. Included in every
// handout, submission.
commonSourcePackages += "common"
// Packages in src/test/scala that are used for grading projects. Always included
// compiling tests, grading a project.
gradingTestPackages += "grading"