diff --git a/src/main/scala/net/vonbuchholtz/sbt/dependencycheck/DependencyCheckPlugin.scala b/src/main/scala/net/vonbuchholtz/sbt/dependencycheck/DependencyCheckPlugin.scala index b3b695c..757c624 100644 --- a/src/main/scala/net/vonbuchholtz/sbt/dependencycheck/DependencyCheckPlugin.scala +++ b/src/main/scala/net/vonbuchholtz/sbt/dependencycheck/DependencyCheckPlugin.scala @@ -264,19 +264,19 @@ object DependencyCheckPlugin extends sbt.AutoPlugin { lazy val aggregateProvidedFilter = ScopeFilter(inAnyProject, inConfigurations(Provided)) lazy val aggregateOptionalFilter = ScopeFilter(inAnyProject, inConfigurations(Optional)) lazy val aggregateCompileTask: Def.Initialize[Task[(ProjectRef, Configuration, Seq[Attributed[File]])]] = Def.task { - (thisProjectRef.value, configuration.value, if (dependencyCheckSkip.value) Seq.empty else (dependencyClasspath in configuration).value) + (thisProjectRef.value, configuration.value, if ((dependencyCheckSkip ?? false).value) Seq.empty else (dependencyClasspath in configuration).value) } lazy val aggregateRuntimeTask: Def.Initialize[Task[(ProjectRef, Configuration, Seq[Attributed[File]])]] = Def.task { - (thisProjectRef.value, configuration.value, if (dependencyCheckSkip.value || dependencyCheckSkipRuntimeScope.value) Seq.empty else (dependencyClasspath in configuration).value) + (thisProjectRef.value, configuration.value, if ((dependencyCheckSkip ?? false).value || (dependencyCheckSkipRuntimeScope ?? false).value) Seq.empty else (dependencyClasspath in configuration).value) } lazy val aggregateTestTask: Def.Initialize[Task[(ProjectRef, Configuration, Seq[Attributed[File]])]] = Def.task { - (thisProjectRef.value, configuration.value, if (dependencyCheckSkip.value || dependencyCheckSkipTestScope.value) Seq.empty else (dependencyClasspath in configuration).value) + (thisProjectRef.value, configuration.value, if ((dependencyCheckSkip ?? false).value || (dependencyCheckSkipTestScope ?? true).value) Seq.empty else (dependencyClasspath in configuration).value) } lazy val aggregateProvidedTask: Def.Initialize[Task[(ProjectRef, Configuration, Seq[Attributed[File]])]] = Def.task { - (thisProjectRef.value, configuration.value, if (dependencyCheckSkip.value || !dependencyCheckSkipProvidedScope.value) Seq.empty else Classpaths.managedJars(configuration.value, classpathTypes.value, update.value)) + (thisProjectRef.value, configuration.value, if ((dependencyCheckSkip ?? false).value || !(dependencyCheckSkipProvidedScope ?? false).value) Seq.empty else Classpaths.managedJars(configuration.value, classpathTypes.value, update.value)) } lazy val aggregateOptionalTask: Def.Initialize[Task[(ProjectRef, Configuration, Seq[Attributed[File]])]] = Def.task { - (thisProjectRef.value, configuration.value, if (dependencyCheckSkip.value || !dependencyCheckSkipOptionalScope.value) Seq.empty else Classpaths.managedJars(configuration.value, classpathTypes.value, update.value)) + (thisProjectRef.value, configuration.value, if ((dependencyCheckSkip ?? false).value || !(dependencyCheckSkipOptionalScope ?? false).value) Seq.empty else Classpaths.managedJars(configuration.value, classpathTypes.value, update.value)) } def addClasspathDependencies(classpathToAdd: Seq[(ProjectRef, Configuration, Seq[Attributed[File]])], checkClasspath: Set[Attributed[File]], log: Logger): Set[Attributed[File]] = { diff --git a/src/sbt-test/sbt-dependency-check/aggregateMetaProject/build.sbt b/src/sbt-test/sbt-dependency-check/aggregateMetaProject/build.sbt new file mode 100644 index 0000000..ac30573 --- /dev/null +++ b/src/sbt-test/sbt-dependency-check/aggregateMetaProject/build.sbt @@ -0,0 +1,5 @@ +lazy val root = (project in file(".")) + .aggregate(meta) + +lazy val meta = project + .disablePlugins(DependencyCheckPlugin) diff --git a/src/sbt-test/sbt-dependency-check/aggregateMetaProject/project/plugins.sbt b/src/sbt-test/sbt-dependency-check/aggregateMetaProject/project/plugins.sbt new file mode 100644 index 0000000..c939695 --- /dev/null +++ b/src/sbt-test/sbt-dependency-check/aggregateMetaProject/project/plugins.sbt @@ -0,0 +1,5 @@ +sys.props.get("plugin.version") match { + case Some(x) => addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % x) + case _ => sys.error("""|The system property 'plugin.version' is not defined. + |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) +} \ No newline at end of file diff --git a/src/sbt-test/sbt-dependency-check/aggregateMetaProject/test b/src/sbt-test/sbt-dependency-check/aggregateMetaProject/test new file mode 100644 index 0000000..555bb7d --- /dev/null +++ b/src/sbt-test/sbt-dependency-check/aggregateMetaProject/test @@ -0,0 +1 @@ +> reload \ No newline at end of file