File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed
sbt-test/sbt-dotty/scaladoc
src/dotty/tools/sbtplugin Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -282,9 +282,12 @@ jobs:
282
282
- name : Add SBT proxy repositories
283
283
run : cp -vf .github/workflows/repositories /root/.sbt/ ; true
284
284
285
- - name : Test
285
+ - name : Test sbt 1.4.x
286
286
run : ./project/scripts/sbt "sbt-dotty/scripted; sbt-community-build/scripted"
287
287
288
+ - name : Test sbt 1.5.x
289
+ run : ./project/scripts/sbt "set \`sbt-dotty\`/scriptedSbt := \"1.5.0-RC1\"; sbt-dotty/scripted sbt-dotty/*"
290
+
288
291
test_java8 :
289
292
runs-on : [self-hosted, Linux]
290
293
container :
Original file line number Diff line number Diff line change 1
1
scalaVersion := sys.props(" plugin.scalaVersion" )
2
2
3
- lazy val assertUsingScaladoc = taskKey[Unit ](" " )
4
-
5
- assertUsingScaladoc := {
3
+ TaskKey [Unit ](" assertUsingScaladoc" ) := {
6
4
assert(useScaladoc.value)
7
5
}
6
+
7
+ TaskKey [Unit ](" checkScaladocOptions" ) := {
8
+ val options = (Compile / doc / scalacOptions).value
9
+ assert(options.count(_ == " -project" ) == 1 )
10
+ }
11
+
12
+ TaskKey [Unit ](" checkHtmlFiles" ) := {
13
+ val helloHtml = (Compile / doc / target).value / " api" / " hello.html"
14
+ assert(helloHtml.exists)
15
+ }
Original file line number Diff line number Diff line change 1
1
> assertUsingScaladoc
2
+ > checkScaladocOptions
2
3
> doc
3
-
4
+ > checkHtmlFiles
Original file line number Diff line number Diff line change @@ -464,7 +464,10 @@ object DottyPlugin extends AutoPlugin {
464
464
else Def .task { originalSources }
465
465
}.value,
466
466
scalacOptions ++= {
467
- if (isDotty.value) {
467
+ // From sbt 1.5 scaladoc is natively supported, and so the scalacOptions are already set.
468
+ val isSbt15 = VersionNumber (sbtVersion.value)
469
+ .matchesSemVer(SemanticSelector (" >=1.5.0-M1" ))
470
+ if (isDotty.value && ! isSbt15) {
468
471
val projectName =
469
472
if (configuration.value == Compile )
470
473
name.value
You can’t perform that action at this time.
0 commit comments