File tree 2 files changed +28
-11
lines changed
sbt-dotty/src/dotty/tools/sbtplugin 2 files changed +28
-11
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,14 @@ object Build {
32
32
val scalacVersion = " 2.12.8"
33
33
34
34
val baseVersion = " 0.14.0"
35
- val baseSbtDottyVersion = " 0.3.1 "
35
+ val baseSbtDottyVersion = " 0.3.2 "
36
36
37
37
// Versions used by the vscode extension to create a new project
38
38
// This should be the latest published releases.
39
39
// TODO: Have the vscode extension fetch these numbers from the Internet
40
40
// instead of hardcoding them ?
41
41
val publishedDottyVersion = " 0.13.0-RC1"
42
- val publishedSbtDottyVersion = " 0.3.0 "
42
+ val publishedSbtDottyVersion = " 0.3.1 "
43
43
44
44
45
45
val dottyOrganization = " ch.epfl.lamp"
Original file line number Diff line number Diff line change @@ -153,8 +153,6 @@ object DottyPlugin extends AutoPlugin {
153
153
scalaOrganization.value
154
154
},
155
155
156
- scalacOptions in (Compile , doc) ++= Seq (" -project" , name.value),
157
-
158
156
incOptions in Compile := {
159
157
val inc = (incOptions in Compile ).value
160
158
if (isDotty.value)
@@ -326,13 +324,32 @@ object DottyPlugin extends AutoPlugin {
326
324
}
327
325
328
326
private val docSettings = inTask(doc)(Seq (
329
- sources := {
330
- val _ = compile.value // Ensure that everything is compiled, so TASTy is available.
331
- val prev = sources.value
332
- val tastyFiles = (classDirectory.value ** " *.tasty" ).get.map(_.getAbsoluteFile)
333
- prev ++ tastyFiles
334
- },
335
- scalacOptions += " -from-tasty"
327
+ sources := Def .taskDyn {
328
+ val old = sources.value
329
+
330
+ if (isDotty.value) Def .task {
331
+ val _ = compile.value // Ensure that everything is compiled, so TASTy is available.
332
+ val tastyFiles = (classDirectory.value ** " *.tasty" ).get.map(_.getAbsoluteFile)
333
+ old ++ tastyFiles
334
+ } else Def .task {
335
+ old
336
+ }
337
+ }.value,
338
+ scalacOptions ++= {
339
+ if (isDotty.value) {
340
+ val projectName =
341
+ if (configuration.value == Compile )
342
+ name.value
343
+ else
344
+ s " ${name.value}- ${configuration.value}"
345
+ Seq (
346
+ " -project" , projectName,
347
+ " -from-tasty"
348
+ )
349
+ }
350
+ else
351
+ Seq ()
352
+ }
336
353
))
337
354
338
355
/** Fetch artifacts for moduleID */
You can’t perform that action at this time.
0 commit comments