@@ -34,13 +34,23 @@ object ExposedValues extends AutoPlugin {
3434}
3535
3636object Build {
37+ val scalacVersion = " 2.12.7"
3738
3839 val baseVersion = " 0.11.0"
39- val scalacVersion = " 2.12.7"
40+ val baseSbtDottyVersion = " 0.2.6"
41+
42+ // Versions used by the vscode extension to create a new project
43+ // This should be the latest published releases.
44+ // TODO: Have the vscode extension fetch these numbers from the Internet
45+ // instead of hardcoding them ?
46+ val publishedDottyVersion = " 0.11.0-bin-20181017-3253921-NIGHTLY" // Using a nightly for now to get worksheet support
47+ val publishedSbtDottyVersion = " 0.2.5"
48+
4049
4150 val dottyOrganization = " ch.epfl.lamp"
4251 val dottyGithubUrl = " https://github.com/lampepfl/dotty"
4352
53+
4454 val isRelease = sys.env.get(" RELEASEBUILD" ) == Some (" yes" )
4555
4656 val dottyVersion = {
@@ -56,8 +66,7 @@ object Build {
5666
5767 val sbtDottyName = " sbt-dotty"
5868 val sbtDottyVersion = {
59- val base = " 0.2.6"
60- if (isRelease) base else base + " -SNAPSHOT"
69+ if (isRelease) baseSbtDottyVersion else baseSbtDottyVersion + " -SNAPSHOT"
6170 }
6271
6372 val agentOptions = List (
@@ -992,9 +1001,11 @@ object Build {
9921001 resourceGenerators in Compile += Def .task {
9931002 // Resources that will be copied when bootstrapping a new project
9941003 val buildSbtFile = baseDirectory.value / " out" / " build.sbt"
995- IO .write(buildSbtFile, s """ scalaVersion := " $dottyVersion" """ )
1004+ IO .write(buildSbtFile,
1005+ s """ scalaVersion := " $publishedDottyVersion" """ )
9961006 val dottyPluginSbtFile = baseDirectory.value / " out" / " dotty-plugin.sbt"
997- IO .write(dottyPluginSbtFile, s """ addSbtPlugin(" $dottyOrganization" % " $sbtDottyName" % " $sbtDottyVersion") """ )
1007+ IO .write(dottyPluginSbtFile,
1008+ s """ addSbtPlugin(" $dottyOrganization" % " $sbtDottyName" % " $publishedSbtDottyVersion") """ )
9981009 Seq (buildSbtFile, dottyPluginSbtFile)
9991010 },
10001011 compile in Compile := Def .task {
0 commit comments