Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace settings.setting with settings.settingWithDefault #321

Open
wants to merge 4 commits into
base: sbt-0.13
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/org/sbtidea/SbtIdeaPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,19 @@ 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))
)
}
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)
Expand Down