File tree 4 files changed +30
-3
lines changed
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
198
198
" mdoc" -> url(" https://scalameta.org/mdoc/" ),
199
199
" Laika" -> url(" https://planet42.github.io/Laika/" ),
200
200
" 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
+ }
202
225
)
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ Check out the [**sbt-typelevel-site**](site.md) plugin.
101
101
We recommend explicitly setting your Scala.js version in ` project/plugins.sbt ` .
102
102
103
103
``` scala
104
- addSbtPlugin(" org.scala-js" % " sbt-scalajs" % " 1.10.0 " )
104
+ addSbtPlugin(" org.scala-js" % " sbt-scalajs" % " @LATEST_SJS_VERSION@ " )
105
105
```
106
106
107
107
** 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
71
71
72
72
ThisBuild / organization := " org.typelevel"
73
73
ThisBuild / organizationName := " Typelevel"
74
- ThisBuild / startYear := Some (2022 )
74
+ ThisBuild / startYear := Some (@ START_YEAR @ )
75
75
ThisBuild / licenses := Seq (License .Apache2 )
76
76
ThisBuild / developers := List (
77
77
// your GitHub handle and name
Original file line number Diff line number Diff line change @@ -24,3 +24,7 @@ Compile / unmanagedSourceDirectories ++= modules.map { module =>
24
24
Compile / unmanagedResourceDirectories ++= modules.map { module =>
25
25
baseDirectory.value.getParentFile / module / " src" / " main" / " resources"
26
26
}
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