From d39e796090660781627626024e5830171a2d49cd Mon Sep 17 00:00:00 2001 From: Sarah Gerweck Date: Sun, 25 Sep 2016 17:18:10 -0700 Subject: [PATCH] Make the standard Eclipse settings an autoplugin --- build.sbt | 1 - project/{Eclipse.scala => EclipseDefaults.scala} | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) rename project/{Eclipse.scala => EclipseDefaults.scala} (66%) diff --git a/build.sbt b/build.sbt index 3150e30..18113c8 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,6 @@ import Resolvers._ lazy val root = (project in file (".")) .enablePlugins(BasicSettings) - .settings(Eclipse.settings: _*) .settings(Publish.settings: _*) .settings(Release.settings: _*) .settings(resolvers += sonatypeRelease) diff --git a/project/Eclipse.scala b/project/EclipseDefaults.scala similarity index 66% rename from project/Eclipse.scala rename to project/EclipseDefaults.scala index 626db91..6f0cc8e 100644 --- a/project/Eclipse.scala +++ b/project/EclipseDefaults.scala @@ -1,10 +1,13 @@ import sbt._ +import com.typesafe.sbteclipse.plugin.EclipsePlugin import com.typesafe.sbteclipse.plugin.EclipsePlugin._ -object Eclipse { +object EclipseDefaults extends AutoPlugin { + override def requires = EclipsePlugin + override def trigger = allRequirements - val settings = Seq ( + override lazy val buildSettings = Seq( EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource, EclipseKeys.projectFlavor := EclipseProjectFlavor.Scala, EclipseKeys.executionEnvironment := Some(EclipseExecutionEnvironment.JavaSE18),