@@ -29,7 +29,7 @@ val isScalaJs1 = Def.setting {
29
29
30
30
def multiScalaDirectories (projectName : String ) =
31
31
Def .setting {
32
- val root = baseDirectory.in (ThisBuild ).value / projectName
32
+ val root = (ThisBuild / baseDirectory ).value / projectName
33
33
val base = root / " src" / " main"
34
34
val result = mutable.ListBuffer .empty[File ]
35
35
val partialVersion = CrossVersion .partialVersion(scalaVersion.value)
@@ -89,15 +89,15 @@ inThisBuild(
89
89
testFrameworks := List (new TestFramework (" munit.Framework" )),
90
90
resolvers += Resolver .sonatypeRepo(" public" ),
91
91
// faster publishLocal:
92
- publishArtifact.in( packageDoc) := " true" == System .getenv(" CI" ),
93
- publishArtifact.in( packageSrc) := " true" == System .getenv(" CI" ),
92
+ packageDoc / publishArtifact := " true" == System .getenv(" CI" ),
93
+ packageSrc / publishArtifact := " true" == System .getenv(" CI" ),
94
94
turbo := true ,
95
95
useSuperShell := false // overlaps with MUnit test failure reports.
96
96
)
97
97
)
98
98
99
99
name := " mdocRoot"
100
- skip in publish := true
100
+ publish / skip := true
101
101
crossScalaVersions := Nil
102
102
lazy val sharedSettings = List (
103
103
scalacOptions ++= crossSetting(
@@ -135,15 +135,15 @@ lazy val interfaces = project
135
135
" io.get-coursier" % " interface" % V .coursier
136
136
),
137
137
// @note needed to deal with issues with dottyDoc
138
- sources in ( Compile , doc) := {
138
+ Compile / doc / sources := {
139
139
if (isScala3.value) {
140
140
Seq .empty
141
141
} else {
142
- (sources in ( Compile , doc) ).value
142
+ (Compile / doc / sources ).value
143
143
}
144
144
},
145
145
crossVersion := CrossVersion .disabled,
146
- javacOptions in ( Compile / doc) ++= List (
146
+ Compile / doc / javacOptions ++= List (
147
147
" -tag" ,
148
148
" implNote:a:Implementation Note:"
149
149
)
@@ -153,7 +153,7 @@ lazy val runtime = project
153
153
.settings(
154
154
sharedSettings,
155
155
moduleName := " mdoc-runtime" ,
156
- unmanagedSourceDirectories.in( Compile ) ++= multiScalaDirectories(" runtime" ).value,
156
+ Compile / unmanagedSourceDirectories ++= multiScalaDirectories(" runtime" ).value,
157
157
libraryDependencies ++= crossSetting(
158
158
scalaVersion.value,
159
159
if2 = List (
@@ -173,18 +173,18 @@ val excludePprint = ExclusionRule(organization = "com.lihaoyi")
173
173
lazy val mdoc = project
174
174
.settings(
175
175
sharedSettings,
176
- unmanagedSourceDirectories.in( Compile ) ++= multiScalaDirectories(" mdoc" ).value,
176
+ Compile / unmanagedSourceDirectories ++= multiScalaDirectories(" mdoc" ).value,
177
177
moduleName := " mdoc" ,
178
- mainClass in assembly := Some (" mdoc.Main" ),
179
- assemblyJarName in assembly := " mdoc.jar" ,
180
- test in assembly := {},
181
- assemblyMergeStrategy.in( assembly) ~= { old =>
178
+ assembly / mainClass := Some (" mdoc.Main" ),
179
+ assembly / assemblyJarName := " mdoc.jar" ,
180
+ assembly / test := {},
181
+ assembly / assemblyMergeStrategy ~= { old =>
182
182
{
183
183
case PathList (" META-INF" , " CHANGES" ) => MergeStrategy .discard
184
184
case x => old(x)
185
185
}
186
186
},
187
- fork in run := true ,
187
+ run / fork := true ,
188
188
buildInfoPackage := " mdoc.internal" ,
189
189
buildInfoKeys := Seq [BuildInfoKey ](
190
190
version,
@@ -227,7 +227,7 @@ lazy val testsInput = project
227
227
.in(file(" tests/input" ))
228
228
.settings(
229
229
sharedSettings,
230
- skip in publish := true
230
+ publish / skip := true
231
231
)
232
232
233
233
def scala212LibraryDependencies (deps : List [ModuleID ]) =
@@ -241,7 +241,7 @@ val tests = project
241
241
.in(file(" tests/tests" ))
242
242
.settings(
243
243
sharedSettings,
244
- skip in publish := true ,
244
+ publish / skip := true ,
245
245
libraryDependencies ++= List (
246
246
" org.scalameta" %% " munit" % V .munit
247
247
),
@@ -257,7 +257,7 @@ val jsdocs = project
257
257
.in(file(" tests/jsdocs" ))
258
258
.settings(
259
259
sharedSettings,
260
- skip in publish := true ,
260
+ publish / skip := true ,
261
261
crossScalaVersions --= scala3,
262
262
scalaJSLinkerConfig ~= {
263
263
_.withModuleKind(ModuleKind .CommonJSModule )
@@ -266,7 +266,7 @@ val jsdocs = project
266
266
" org.scala-js" %%% " scalajs-dom" % scalajsDom
267
267
),
268
268
scalaJSUseMainModuleInitializer := true ,
269
- npmDependencies in Compile ++= List (
269
+ Compile / npmDependencies ++= List (
270
270
" ms" -> " 2.1.1"
271
271
),
272
272
webpackBundlingMode := BundlingMode .LibraryOnly ()
@@ -277,7 +277,7 @@ lazy val worksheets = project
277
277
.in(file(" tests/worksheets" ))
278
278
.settings(
279
279
sharedSettings,
280
- skip in publish := true ,
280
+ publish / skip := true ,
281
281
libraryDependencies ++= List (
282
282
" org.scalameta" %% " munit" % V .munit % Test
283
283
)
@@ -288,7 +288,7 @@ lazy val unit = project
288
288
.in(file(" tests/unit" ))
289
289
.settings(
290
290
sharedSettings,
291
- skip in publish := true ,
291
+ publish / skip := true ,
292
292
crossScalaVersions --= scala3,
293
293
addCompilerPlugin(" org.typelevel" %% " kind-projector" % " 0.10.3" ),
294
294
resolvers += Resolver .bintrayRepo(" cibotech" , " public" ),
@@ -305,7 +305,7 @@ lazy val unit = project
305
305
),
306
306
buildInfoPackage := " tests.cli" ,
307
307
buildInfoKeys := Seq [BuildInfoKey ](
308
- " testsInputClassDirectory" -> classDirectory.in (testsInput, Compile ).value
308
+ " testsInputClassDirectory" -> (testsInput / Compile / classDirectory ).value
309
309
),
310
310
mdocJS := Some (jsdocs)
311
311
)
@@ -317,7 +317,7 @@ lazy val plugin = project
317
317
.settings(
318
318
sharedSettings,
319
319
sbtPlugin := true ,
320
- sbtVersion in pluginCrossBuild := " 1.0.0" ,
320
+ pluginCrossBuild / sbtVersion := " 1.0.0" ,
321
321
crossScalaVersions := List (scala212),
322
322
moduleName := " sbt-mdoc" ,
323
323
libraryDependencies ++= List (
@@ -326,20 +326,20 @@ lazy val plugin = project
326
326
" org.scalameta" %% " munit" % V .munit % Test ,
327
327
" org.scalameta" %% " testkit" % V .scalameta % Test
328
328
),
329
- resourceGenerators.in( Compile ) += Def .task {
329
+ Compile / resourceGenerators += Def .task {
330
330
val out =
331
- managedResourceDirectories.in (Compile ).value.head / " sbt-mdoc.properties"
331
+ (Compile / managedResourceDirectories ).value.head / " sbt-mdoc.properties"
332
332
val props = new java.util.Properties ()
333
333
props.put(" version" , version.value)
334
334
IO .write(props, " sbt-mdoc properties" , out)
335
335
List (out)
336
336
},
337
337
publishLocal := publishLocal
338
338
.dependsOn(
339
- publishLocal in interfaces ,
340
- publishLocal in runtime ,
341
- publishLocal in mdoc ,
342
- publishLocal in js
339
+ interfaces / publishLocal ,
340
+ runtime / publishLocal ,
341
+ mdoc / publishLocal ,
342
+ js / publishLocal
343
343
)
344
344
.value,
345
345
scriptedBufferLog := false ,
@@ -370,20 +370,20 @@ lazy val docs = project
370
370
sharedSettings,
371
371
moduleName := " mdoc-docs" ,
372
372
crossScalaVersions := List (scala212),
373
- skip in publish :=
373
+ publish / skip :=
374
374
! scalaVersion.value.startsWith(" 2.12" ) ||
375
- version.in (ThisBuild ).value.endsWith(" -SNAPSHOT" ),
375
+ (ThisBuild / version ).value.endsWith(" -SNAPSHOT" ),
376
376
mdocAutoDependency := false ,
377
377
resolvers += Resolver .bintrayRepo(" cibotech" , " public" ),
378
378
libraryDependencies ++= List (
379
379
" org.scala-sbt" % " sbt" % sbtVersion.value,
380
380
" com.cibo" %% " evilplot" % " 0.6.3"
381
381
),
382
- watchSources += baseDirectory.in (ThisBuild ).value / " docs" ,
383
- cancelable in Global := true ,
384
- MdocPlugin .autoImport.mdoc := run.in (Compile ).evaluated,
382
+ watchSources += (ThisBuild / baseDirectory ).value / " docs" ,
383
+ Global / cancelable := true ,
384
+ MdocPlugin .autoImport.mdoc := (Compile / run ).evaluated,
385
385
mdocJS := Some (jsdocs),
386
- mdocJSLibraries := webpack.in (jsdocs, Compile , fullOptJS).value,
386
+ mdocJSLibraries := (jsdocs / Compile / fullOptJS / webpack ).value,
387
387
mdocVariables := {
388
388
val stableVersion : String =
389
389
version.value.replaceFirst(" \\ +.*" , " " )
0 commit comments