summaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan@lightbend.com>2016-07-26 11:12:33 -0700
committerGitHub <noreply@github.com>2016-07-26 11:12:33 -0700
commit7102f643a9670e7c1b12a23375eba27e4359d0a0 (patch)
treea76668307ac45cf115e9b57288c073f2db0a9bc0 /build.sbt
parent4bc9ca51a4b016bdb9c24a7bcb776ae8d5de9436 (diff)
parent3205091c5530b41072dc0624a3362809bdadf6ee (diff)
downloadscala-7102f643a9670e7c1b12a23375eba27e4359d0a0.tar.gz
scala-7102f643a9670e7c1b12a23375eba27e4359d0a0.tar.bz2
scala-7102f643a9670e7c1b12a23375eba27e4359d0a0.zip
Merge pull request #5299 from mpociecha/improve-intellij-integration
Improve sbt-based IntelliJ integration in case of Windows
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.sbt b/build.sbt
index 78f30c220f..8051dfa2cc 100644
--- a/build.sbt
+++ b/build.sbt
@@ -935,7 +935,7 @@ intellij := {
val modules: List[(String, Seq[File])] = {
// for the sbt build module, the dependencies are fetched from the project's build using sbt-buildinfo
- val buildModule = ("scala-build", scalabuild.BuildInfo.buildClasspath.split(":").toSeq.map(new File(_)))
+ val buildModule = ("scala-build", scalabuild.BuildInfo.buildClasspath.split(java.io.File.pathSeparator).toSeq.map(new File(_)))
// `sbt projects` lists all modules in the build
buildModule :: List(
moduleDeps(compilerP).value,
@@ -1014,12 +1014,14 @@ intellij := {
var continue = false
if (!ipr.exists) {
scala.Console.print(s"Could not find src/intellij/scala.ipr. Create new project files from src/intellij/*.SAMPLE (y/N)? ")
+ scala.Console.flush()
if (scala.Console.readLine() == "y") {
intellijCreateFromSample((baseDirectory in ThisBuild).value)
continue = true
}
} else {
scala.Console.print("Update library classpaths in the current src/intellij/scala.ipr (y/N)? ")
+ scala.Console.flush()
continue = scala.Console.readLine() == "y"
}
if (continue) {
@@ -1044,6 +1046,7 @@ lazy val intellijFromSample = taskKey[Unit]("Create fresh IntelliJ project files
intellijFromSample := {
val s = streams.value
scala.Console.print(s"Create new project files from src/intellij/*.SAMPLE (y/N)? ")
+ scala.Console.flush()
if (scala.Console.readLine() == "y")
intellijCreateFromSample((baseDirectory in ThisBuild).value)
else
@@ -1061,6 +1064,7 @@ lazy val intellijToSample = taskKey[Unit]("Update src/intellij/*.SAMPLE using th
intellijToSample := {
val s = streams.value
scala.Console.print(s"Update src/intellij/*.SAMPLE using the current IntelliJ project files (y/N)? ")
+ scala.Console.flush()
if (scala.Console.readLine() == "y") {
val basedir = (baseDirectory in ThisBuild).value
val existing = basedir / "src/intellij" * "*.SAMPLE"