mirror of https://github.com/sbt/sbt.git
Simplified handling of undefined settings
(Also avoiding null)
This commit is contained in:
parent
363a841f5a
commit
330134d5d9
|
|
@ -167,7 +167,7 @@ object Tasks {
|
||||||
} yield {
|
} yield {
|
||||||
val publish = publishArtifact.in(projectRef).in(pkgTask).in(config).getOrElse(state, false)
|
val publish = publishArtifact.in(projectRef).in(pkgTask).in(config).getOrElse(state, false)
|
||||||
if (publish)
|
if (publish)
|
||||||
Option(artifact.in(projectRef).in(pkgTask).in(config).getOrElse(state, null))
|
artifact.in(projectRef).in(pkgTask).in(config).find(state)
|
||||||
.map(targetConfig -> _)
|
.map(targetConfig -> _)
|
||||||
else
|
else
|
||||||
None
|
None
|
||||||
|
|
@ -200,9 +200,7 @@ object Tasks {
|
||||||
// Second-way of getting artifacts from SBT
|
// Second-way of getting artifacts from SBT
|
||||||
// No obvious way of getting the corresponding publishArtifact value for the ones
|
// No obvious way of getting the corresponding publishArtifact value for the ones
|
||||||
// only here, it seems.
|
// only here, it seems.
|
||||||
val extraSbtArtifacts = Option(artifacts.in(projectRef).getOrElse(state, null))
|
val extraSbtArtifacts = artifacts.in(projectRef).getOrElse(state, Nil)
|
||||||
.toSeq
|
|
||||||
.flatten
|
|
||||||
.filterNot(stdArtifactsSet)
|
.filterNot(stdArtifactsSet)
|
||||||
|
|
||||||
// Seems that SBT does that - if an artifact has no configs,
|
// Seems that SBT does that - if an artifact has no configs,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue