diff --git a/mdoc-sbt/src/main/scala/mdoc/DocusaurusPlugin.scala b/mdoc-sbt/src/main/scala/mdoc/DocusaurusPlugin.scala index a14de9ff2..67857b109 100644 --- a/mdoc-sbt/src/main/scala/mdoc/DocusaurusPlugin.scala +++ b/mdoc-sbt/src/main/scala/mdoc/DocusaurusPlugin.scala @@ -27,7 +27,7 @@ object DocusaurusPlugin extends AutoPlugin { import autoImport._ def website: Def.Initialize[File] = Def.setting { - baseDirectory.in(ThisBuild).value / "website" + (ThisBuild / baseDirectory).value / "website" } def listJarFiles(root: Path): List[(File, String)] = { @@ -95,8 +95,8 @@ object DocusaurusPlugin extends AutoPlugin { override def projectSettings: Seq[Def.Setting[_]] = List( - aggregate.in(docusaurusPublishGhpages) := false, - aggregate.in(docusaurusCreateSite) := false, + (docusaurusPublishGhpages / aggregate) := false, + (docusaurusCreateSite / aggregate) := false, docusaurusProjectName := moduleName.value.stripSuffix("-docs"), MdocPlugin.mdocInternalVariables ++= List( "js-out-prefix" -> "assets" @@ -146,7 +146,7 @@ object DocusaurusPlugin extends AutoPlugin { Relativize.htmlSite(out.toPath) out }, - packageDoc.in(Compile) := { + (Compile / packageDoc) := { val directory = doc.value val jar = target.value / "docusaurus.jar" val files = listJarFiles(directory.toPath) diff --git a/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala b/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala index a4f5cef57..d1617ae7e 100644 --- a/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala +++ b/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala @@ -78,8 +78,8 @@ object MdocPlugin extends AutoPlugin { override def projectSettings: Seq[Def.Setting[_]] = List( - mdocIn := baseDirectory.in(ThisBuild).value / "docs", - mdocOut := target.in(Compile).value / "mdoc", + mdocIn := (ThisBuild / baseDirectory).value / "docs", + mdocOut := (Compile / target).value / "mdoc", mdocVariables := Map.empty, mdocExtraArguments := Nil, mdocJS := None, @@ -96,7 +96,7 @@ object MdocPlugin extends AutoPlugin { parsed ).flatten.mkString(" ") Def.taskDyn { - runMain.in(Compile).toTask(s" mdoc.SbtMain $args") + (Compile / runMain).toTask(s" mdoc.SbtMain $args") } }.evaluated, dependencyOverrides ++= List( @@ -114,9 +114,9 @@ object MdocPlugin extends AutoPlugin { List() } }, - resourceGenerators.in(Compile) += Def.task { + (Compile / resourceGenerators) += Def.task { val out = - managedResourceDirectories.in(Compile).value.head / "mdoc.properties" + (Compile / managedResourceDirectories).value.head / "mdoc.properties" val props = new java.util.Properties() mdocVariables.value.foreach { case (key, value) => props.put(key, value) @@ -126,9 +126,9 @@ object MdocPlugin extends AutoPlugin { } def getJars(mid: ModuleID) = { - val depRes = dependencyResolution.in(update).value - val updc = updateConfiguration.in(update).value - val uwconfig = unresolvedWarningConfiguration.in(update).value + val depRes = (update / dependencyResolution).value + val updc = (update / updateConfiguration).value + val uwconfig = (update / unresolvedWarningConfiguration).value val modDescr = depRes.wrapDependencyInModule(mid) depRes @@ -190,13 +190,13 @@ object MdocPlugin extends AutoPlugin { props.put("out", mdocOut.value.toString) props.put( "scalacOptions", - scalacOptions.in(Compile).value.mkString(" ") + (Compile / scalacOptions).value.mkString(" ") ) val classpath = ListBuffer.empty[File] // Can't use fullClasspath.value because it introduces cyclic dependency between // compilation and resource generation. - classpath ++= dependencyClasspath.in(Compile).value.iterator.map(_.data) - classpath += classDirectory.in(Compile).value + classpath ++= (Compile / dependencyClasspath).value.iterator.map(_.data) + classpath += (Compile / classDirectory).value props.put( "classpath", classpath.mkString(java.io.File.pathSeparator) @@ -204,7 +204,7 @@ object MdocPlugin extends AutoPlugin { IO.write(props, "mdoc properties", out) val esVersion = props.clone().asInstanceOf[java.util.Properties] esVersion.put("js-module-kind", "ESModule") - val esOut = managedResourceDirectories.in(Compile).value.head / "es.properties" + val esOut = (Compile / managedResourceDirectories).value.head / "es.properties" IO.write( esVersion, "mdoc esmoddule properties",