File tree 4 files changed +14
-3
lines changed
sbt-test/sbt-dotty/scala3doc
src/dotty/tools/sbtplugin 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,10 @@ final case class SbtCommunityProject(
155
155
++ s " ++ $compilerVersion!; "
156
156
157
157
override val testCommand = s " $baseCommand$sbtTestCommand"
158
- override val publishCommand = if sbtPublishCommand eq null then null else s " $baseCommand$sbtPublishCommand"
158
+ override val publishCommand = if sbtPublishCommand eq null then null else
159
+ val disableDocCommand =
160
+ if sbtDocCommand eq null then " " else " set every useScala3doc := false;"
161
+ s " $baseCommand$disableDocCommand$sbtPublishCommand"
159
162
override val docCommand =
160
163
if sbtDocCommand eq null then null else
161
164
val cmd = if sbtDocCommand.startsWith(" ;" ) then sbtDocCommand else s " ; $sbtDocCommand"
Original file line number Diff line number Diff line change 1
1
scalaVersion := sys.props(" plugin.scalaVersion" )
2
2
3
- useScala3doc := true
3
+ lazy val assertUsingScala3doc = taskKey[Unit ](" " )
4
+
5
+ assertUsingScala3doc := {
6
+ assert(useScala3doc.value)
7
+ }
Original file line number Diff line number Diff line change
1
+ > assertUsingScala3doc
1
2
> doc
2
3
Original file line number Diff line number Diff line change @@ -367,7 +367,10 @@ object DottyPlugin extends AutoPlugin {
367
367
368
368
// Configuration for the doctool
369
369
resolvers ++= (if (! useScala3doc.value) Nil else Seq (Resolver .jcenterRepo)),
370
- useScala3doc := false ,
370
+ useScala3doc := {
371
+ val v = scalaVersion.value
372
+ v.startsWith(" 3.0.0" ) && ! v.startsWith(" 3.0.0-M1" ) && ! v.startsWith(" 3.0.0-M2" )
373
+ },
371
374
// We need to add doctool classes to the classpath so they can be called
372
375
scalaInstance in doc := Def .taskDyn {
373
376
if (isDotty.value)
You can’t perform that action at this time.
0 commit comments