Skip to content

Add a compiler.properties resource file like in Scala 2 #1013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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