diff --git a/project/Build.scala b/project/Build.scala index 09feed9..a006dd3 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -9,7 +9,7 @@ object SbtIdeaBuild extends Build with BuildExtra { organization := "com.github.mpeltonen", name := "sbt-idea", version := "1.7.0-SNAPSHOT", - sbtVersion in Global := "0.13.2", + sbtVersion in Global := "0.13.5", scalaVersion in Global := "2.10.3", publishTo <<= version { (v: String) => val nexus = "https://oss.sonatype.org/" diff --git a/src/main/scala/org/sbtidea/SbtIdeaPlugin.scala b/src/main/scala/org/sbtidea/SbtIdeaPlugin.scala index 4e975a4..37c134b 100644 --- a/src/main/scala/org/sbtidea/SbtIdeaPlugin.scala +++ b/src/main/scala/org/sbtidea/SbtIdeaPlugin.scala @@ -203,7 +203,7 @@ object SbtIdeaPlugin extends Plugin { val compileDirectories: Directories = directoriesFor(Configurations.Compile) def appendExtraTestDirectories(directories: Directories) = { - val extraConfigurations = (Seq(Configurations.IntegrationTest) ++ settings.setting(ideaExtraTestConfigurations, "Missing extra test configuration")) + val extraConfigurations = (Seq(Configurations.IntegrationTest) ++ settings.settingWithDefault(ideaExtraTestConfigurations, Seq())) extraConfigurations.foldLeft(directories)((dirs,conf) => dirs.addSrc(sourceDirectoriesFor(conf)).addRes(resourceDirectoriesFor(conf)) ) @@ -211,11 +211,11 @@ object SbtIdeaPlugin extends Plugin { val testDirectories: Directories = appendExtraTestDirectories(directoriesFor(Configurations.Test)) val librariesExtractor = new SbtIdeaModuleMapping.LibrariesExtractor(buildStruct, state, projectRef, scalaInstance, withClassifiers = if (args.contains(NoClassifiers)) None else { - Some((settings.setting(ideaSourcesClassifiers, "Missing idea-sources-classifiers"), settings.setting(ideaJavadocsClassifiers, "Missing idea-javadocs-classifiers"))) + Some((settings.settingWithDefault(ideaSourcesClassifiers, Seq("sources")), settings.settingWithDefault(ideaJavadocsClassifiers, Seq("javadoc")))) } ) - val basePackage = settings.setting(ideaBasePackage, "missing IDEA base package") - val packagePrefix = settings.setting(ideaPackagePrefix, "missing package prefix") + val basePackage = settings.optionalSetting(ideaBasePackage).flatten + val packagePrefix = settings.optionalSetting(ideaPackagePrefix).flatten val extraFacets = settings.settingWithDefault(ideaExtraFacets, NodeSeq.Empty) val includeScalaFacet = settings.settingWithDefault(ideaIncludeScalaFacet, true) def isAggregate(p: String) = allProjectIds(p)