File tree Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -198,5 +198,28 @@ lazy val docs = project
198198 " mdoc" -> url(" https://scalameta.org/mdoc/" ),
199199 " Laika" -> url(" https://planet42.github.io/Laika/" ),
200200 " sbt-unidoc" -> url(" https://github.com/sbt/sbt-unidoc" )
201- )
201+ ),
202+ mdocVariables ++= {
203+ import coursier .complete .Complete
204+ import java .time ._
205+ import scala .concurrent ._
206+ import scala .concurrent .duration ._
207+ import scala .concurrent .ExecutionContext .Implicits ._
208+
209+ val startYear = YearMonth .now().getYear.toString
210+
211+ val sjsVersionFuture =
212+ Complete ().withInput(s " org.scala-js:scalajs-library_2.13: " ).complete().future()
213+ val sjsVersion =
214+ try {
215+ Await .result(sjsVersionFuture, 5 .seconds)._2.last
216+ } catch {
217+ case ex : TimeoutException => scalaJSVersion // not the latest but better than nothing
218+ }
219+
220+ Map (
221+ " START_YEAR" -> startYear,
222+ " LATEST_SJS_VERSION" -> sjsVersion
223+ )
224+ }
202225 )
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ Check out the [**sbt-typelevel-site**](site.md) plugin.
101101We recommend explicitly setting your Scala.js version in ` project/plugins.sbt ` .
102102
103103``` scala
104- addSbtPlugin(" org.scala-js" % " sbt-scalajs" % " 1.10.0 " )
104+ addSbtPlugin(" org.scala-js" % " sbt-scalajs" % " @LATEST_SJS_VERSION@ " )
105105```
106106
107107** sbt-typelevel** ships with a conservative Scala.js version to enable certain settings.
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ ThisBuild / tlBaseVersion := "0.4" // your current series x.y
7171
7272ThisBuild / organization := " org.typelevel"
7373ThisBuild / organizationName := " Typelevel"
74- ThisBuild / startYear := Some (2022 )
74+ ThisBuild / startYear := Some (@ START_YEAR @ )
7575ThisBuild / licenses := Seq (License .Apache2 )
7676ThisBuild / developers := List (
7777 // your GitHub handle and name
Original file line number Diff line number Diff line change @@ -24,3 +24,7 @@ Compile / unmanagedSourceDirectories ++= modules.map { module =>
2424Compile / unmanagedResourceDirectories ++= modules.map { module =>
2525 baseDirectory.value.getParentFile / module / " src" / " main" / " resources"
2626}
27+
28+ libraryDependencies ++= Seq (
29+ " io.get-coursier" %% " coursier" % " 2.1.0-M6"
30+ )
You can’t perform that action at this time.
0 commit comments