@@ -51,7 +51,7 @@ object DottyIDEPlugin extends AutoPlugin {
5151 val extracted = Project .extract(state)
5252 val settings = extracted.structure.data
5353
54- if (projRefs.forall(projRef => scalaVersion.in (projRef).get(settings).get == newScalaVersion))
54+ if (projRefs.forall(projRef => (projRef / scalaVersion ).get(settings).get == newScalaVersion))
5555 state
5656 else {
5757 def matchingSetting (setting : Setting [_]) =
@@ -60,7 +60,7 @@ object DottyIDEPlugin extends AutoPlugin {
6060
6161 val newSettings = extracted.session.mergeSettings.collect {
6262 case setting if matchingSetting(setting) =>
63- scalaVersion in setting.key.scope := newScalaVersion
63+ setting.key.scope / scalaVersion := newScalaVersion
6464 }
6565 val newSession = extracted.session.appendRaw(newSettings)
6666 BuiltinCommands .reapply(newSession, extracted.structure, state)
@@ -82,14 +82,14 @@ object DottyIDEPlugin extends AutoPlugin {
8282
8383 val (dottyVersions, dottyProjRefs) =
8484 structure.allProjectRefs.flatMap { projRef =>
85- if (excludeFromIDE.in (projRef).get(settings) == Some (true ))
85+ if ((projRef / excludeFromIDE ).get(settings) == Some (true ))
8686 None
8787 else {
88- val version = scalaVersion.in (projRef).get(settings).get
88+ val version = (projRef / scalaVersion ).get(settings).get
8989 if (isDottyVersion(version))
9090 Some ((version, projRef))
9191 else
92- crossScalaVersions.in (projRef).get(settings).get.filter(isDottyVersion).sorted.lastOption match {
92+ (projRef / crossScalaVersions ).get(settings).get.filter(isDottyVersion).sorted.lastOption match {
9393 case Some (v) =>
9494 Some ((v, projRef))
9595 case _ =>
@@ -134,11 +134,11 @@ object DottyIDEPlugin extends AutoPlugin {
134134 val joinedTask = projRefs.flatMap { projRef =>
135135 val project = Project .getProjectForReference(projRef, structure).get
136136 project.configurations.flatMap { config =>
137- excludeFromIDE.in (projRef, config).get(settings) match {
137+ (projRef / config / excludeFromIDE ).get(settings) match {
138138 case Some (true ) =>
139139 None // skip this configuration
140140 case _ =>
141- key.in (projRef, config).get(settings)
141+ (projRef / config / key ).get(settings)
142142 }
143143 }
144144 }.join
@@ -288,7 +288,7 @@ object DottyIDEPlugin extends AutoPlugin {
288288 private def makeId (name : String , config : String ): String = s " $name/ $config"
289289
290290 private def projectConfigTask (config : Configuration ): Initialize [Task [Option [ProjectConfig ]]] = Def .taskDyn {
291- val depClasspath = Attributed .data((dependencyClasspath in config ).value)
291+ val depClasspath = Attributed .data((config / dependencyClasspath ).value)
292292 val projectName = name.value
293293
294294 // Try to detect if this is a real Scala project or not. This is pretty
@@ -314,14 +314,14 @@ object DottyIDEPlugin extends AutoPlugin {
314314 // Not needed to generate the config, but this guarantees that the
315315 // generated config is usable by an IDE without any extra compilation
316316 // step.
317- val _ = (compile in config ).value
317+ val _ = (config / compile ).value
318318
319319 val project = thisProject.value
320320 val id = makeId(project.id, config.name)
321- val compilerVersion = (scalaVersion in config ).value
322- val compilerArguments = (scalacOptions in config ).value
323- val sourceDirectories = (unmanagedSourceDirectories in config ).value ++ (managedSourceDirectories in config ).value
324- val classDir = (classDirectory in config ).value
321+ val compilerVersion = (config / scalaVersion ).value
322+ val compilerArguments = (config / scalacOptions ).value
323+ val sourceDirectories = (config / unmanagedSourceDirectories ).value ++ (config / managedSourceDirectories ).value
324+ val classDir = (config / classDirectory ).value
325325 val extracted = Project .extract(state.value)
326326 val settings = extracted.structure.data
327327
@@ -331,7 +331,7 @@ object DottyIDEPlugin extends AutoPlugin {
331331 // We filter out dependencies that do not compile using Dotty
332332 val classpathProjectDependencies =
333333 project.dependencies.filter { d =>
334- val version = scalaVersion.in (d.project).get(settings).get
334+ val version = (d.project / scalaVersion ).get(settings).get
335335 isDottyVersion(version)
336336 }.map(d => projectDependencyName(d, config, project, logger))
337337 val configDependencies =
@@ -361,8 +361,8 @@ object DottyIDEPlugin extends AutoPlugin {
361361 // TODO: It would be better to use Def.derive to define projectConfig in
362362 // every configuration where the keys it depends on exist, however this
363363 // currently breaks aggregated tasks: https://github.com/sbt/sbt/issues/3580
364- projectConfig in Compile := projectConfigTask(Compile ).value,
365- projectConfig in Test := projectConfigTask(Test ).value
364+ Compile / projectConfig := projectConfigTask(Compile ).value,
365+ Test / projectConfig := projectConfigTask(Test ).value
366366 )
367367
368368 override def buildSettings : Seq [Setting [_]] = Seq (
@@ -432,7 +432,7 @@ object DottyIDEPlugin extends AutoPlugin {
432432 val eligibleConfigs = activeProjectConfigs.filter { c =>
433433 val configKey = ConfigKey .configurationToKey(c)
434434 // Consider only configurations where the `compile` key is defined
435- val eligibleKey = compile in (thisProjectRef, configKey)
435+ val eligibleKey = (thisProjectRef / configKey / compile )
436436 eligibleKey.get(data) match {
437437 case Some (t) =>
438438 // Sbt seems to return tasks for the extended configurations (looks like a big bug)
0 commit comments