Skip to content

Commit

Permalink
Merge pull request scala#1013 from dotty-staging/add/sbt-stuff
Browse files Browse the repository at this point in the history
Add a compiler.properties resource file like in Scala 2
  • Loading branch information
smarter committed Jan 4, 2016
2 parents 013c823 + fc32218 commit 66e02a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ object DottyBuild extends Build {
unmanagedSourceDirectories in Compile := Seq((scalaSource in Compile).value),
unmanagedSourceDirectories in Test := Seq((scalaSource in Test).value),

// Generate compiler.properties, used by sbt
resourceGenerators in Compile += Def.task {
val file = (resourceManaged in Compile).value / "compiler.properties"
val contents = s"version.number=${version.value}"
IO.write(file, contents)
Seq(file)
}.taskValue,

// include sources in eclipse (downloads source code for all dependencies)
//http://stackoverflow.com/questions/10472840/how-to-attach-sources-to-sbt-managed-dependencies-in-scala-ide#answer-11683728
com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys.withSource := true,
Expand Down

0 comments on commit 66e02a5

Please sign in to comment.