diff --git a/project/Build.scala b/project/Build.scala index 0287cfcbd240..d54d83170957 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -189,7 +189,8 @@ object Build { // Do not append Scala versions to the generated artifacts crossPaths := false, // Do not depend on the Scala library - autoScalaLibrary := false + autoScalaLibrary := false, + excludeFromIDE := true ) // Settings used when compiling dotty (both non-boostrapped and bootstrapped) @@ -203,7 +204,8 @@ object Build { version := dottyNonBootstrappedVersion, scalaVersion := referenceVersion, // To be removed once we stop cross-compiling with Scala 2 - crossScalaVersions := Seq(referenceVersion, scalacVersion) + crossScalaVersions := Seq(referenceVersion, scalacVersion), + excludeFromIDE := true ) // Settings used when compiling dotty with a non-bootstrapped dotty @@ -977,12 +979,9 @@ object Build { val updateCommunityBuild = taskKey[Unit]("Updates the community build.") lazy val `community-build` = project.in(file("community-build")). - settings(commonSettings). + dependsOn(dottyLibrary(Bootstrapped)). + settings(commonBootstrappedSettings). settings( - scalaVersion := referenceVersion, - // To be removed once we stop cross-compiling with Scala 2 - crossScalaVersions := Seq(referenceVersion, scalacVersion), - prepareCommunityBuild := { (publishLocal in `dotty-sbt-bridge`).value (publishLocal in `dotty-interfaces`).value diff --git a/sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala b/sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala index 4f2610362a7e..8ddd106ed5bb 100644 --- a/sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala +++ b/sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala @@ -82,16 +82,20 @@ object DottyIDEPlugin extends AutoPlugin { val (dottyVersions, dottyProjRefs) = structure.allProjectRefs.flatMap { projRef => - val version = scalaVersion.in(projRef).get(settings).get - if (isDottyVersion(version)) - Some((version, projRef)) - else - crossScalaVersions.in(projRef).get(settings).get.filter(isDottyVersion).sorted.lastOption match { - case Some(v) => - Some((v, projRef)) - case _ => - None - } + if (excludeFromIDE.in(projRef).get(settings) == Some(true)) + None + else { + val version = scalaVersion.in(projRef).get(settings).get + if (isDottyVersion(version)) + Some((version, projRef)) + else + crossScalaVersions.in(projRef).get(settings).get.filter(isDottyVersion).sorted.lastOption match { + case Some(v) => + Some((v, projRef)) + case _ => + None + } + } }.unzip if (dottyVersions.isEmpty)