Skip to content

Instantly share code, notes, and snippets.

@EECOLOR
Created September 17, 2014 19:38
Show Gist options
  • Save EECOLOR/ebe28526e37598860baa to your computer and use it in GitHub Desktop.
Save EECOLOR/ebe28526e37598860baa to your computer and use it in GitHub Desktop.
Sbt cyclic project dependencies. Helps in tying projects together if they depend on eachother.
internalDependencyClasspath in Compile in `play-cms-testing` +=
interProjectDependency(`play-cms`, Compile).value
internalDependencyClasspath in Test in `play-cms` +=
interProjectDependency(`play-cms-testing`, Compile).value
def interProjectDependency(project:Project, configuration:Configuration) = Def.task {
Attributed.blank(
(classDirectory in configuration in project)
.map(identity) // convert the setting into a task
.dependsOn(compile in configuration in project)
.value
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment