@@ -1303,6 +1303,16 @@ object Build {
13031303 }
13041304 }
13051305
1306+ def staticAssets = Def .task {
1307+ DocumentationWebsite .generateStaticAssets(
1308+ (`scaladoc-js-contributors` / Compile / fullOptJS).value.data,
1309+ (`scaladoc-js-main` / Compile / fullOptJS).value.data,
1310+ (`scaladoc-js-contributors` / Compile / baseDirectory).value / " css" ,
1311+ (`scaladoc-js-common` / Compile / baseDirectory).value / " css" ,
1312+ (Compile / resourceManaged).value,
1313+ )
1314+ }
1315+
13061316 val SourceLinksIntegrationTest = config(" sourceLinksIntegrationTest" ) extend Test
13071317
13081318 lazy val scaladoc = project.in(file(" scaladoc" )).
@@ -1316,15 +1326,7 @@ object Build {
13161326 SourceLinksIntegrationTest / test:= ((SourceLinksIntegrationTest / test) dependsOn generateScalaDocumentation.toTask(" " )).value,
13171327 ).
13181328 settings(
1319- Compile / resourceGenerators += Def .task {
1320- DocumentationWebsite .generateStaticAssets(
1321- (`scaladoc-js-contributors` / Compile / fullOptJS).value.data,
1322- (`scaladoc-js-main` / Compile / fullOptJS).value.data,
1323- (`scaladoc-js-contributors` / Compile / baseDirectory).value / " css" ,
1324- (`scaladoc-js-common` / Compile / baseDirectory).value / " css" ,
1325- (Compile / resourceManaged).value,
1326- )
1327- }.taskValue,
1329+ Compile / resourceGenerators += staticAssets.taskValue,
13281330 libraryDependencies ++= Dependencies .flexmarkDeps ++ Seq (
13291331 " nl.big-o" % " liqp" % " 0.8.2" ,
13301332 " org.jsoup" % " jsoup" % " 1.14.3" , // Needed to process .html files for static site
@@ -1382,6 +1384,8 @@ object Build {
13821384 generateReferenceDocumentation := Def .inputTaskDyn {
13831385 val shouldRegenerateExpectedLinks = literal(" --no-regenerate-expected-links" ).? .parsed.isEmpty
13841386
1387+ staticAssets.value
1388+
13851389 val temp = IO .createTemporaryDirectory
13861390 IO .copyDirectory(file(" docs" ), temp / " docs" )
13871391 IO .delete(temp / " docs" / " _blog" )
0 commit comments