Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.
Merged
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
14 changes: 13 additions & 1 deletion src/main/scala/com/lightbend/rp/sbtreactiveapp/App.scala
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@ case object BasicApp extends DeployableApp {
aggregate in kubectl := false,
aggregate in minikube := false)

// This dynamic task collects all of the unmanaged resources in the projects
// that are dependent of thisProject, as well as those of thisProject itself.
val unmanagedTransitive = Def.taskDyn {
val subProjects = sbt.Classpaths.interSort(
thisProjectRef.value, Compile,
settingsData.value, buildDependencies.value).map { _._1 }
unmanagedResources.all(
ScopeFilter(
inProjects(subProjects: _*),
inConfigurations(Compile)))
}

override def projectSettings: Seq[Setting[_]] =
super.projectSettings ++ Vector(
appName := name.value,
Expand Down Expand Up @@ -276,7 +288,7 @@ case object BasicApp extends DeployableApp {
// 2. compare its SHA1 against cache/sbt-reactive-app-inputs
IO.write(tempFile, magic.Build.extractApplicationConf(
Vector(ToolingConfig), Vector(unmanagedConfigName),
(unmanagedResources in Compile).value, (dependencyClasspath in Compile).value)
unmanagedTransitive.value.flatten, (dependencyClasspath in Compile).value)
.getOrElse(""))
cachedCopyFile(FileInfo.hash(tempFile))
Seq(outFile)
Expand Down