Skip to content

Instantly share code, notes, and snippets.

@danslapman
Created December 29, 2017 11:48
Show Gist options
  • Save danslapman/a43b4811b18d0ae6ab6aa64049fa4581 to your computer and use it in GitHub Desktop.
Save danslapman/a43b4811b18d0ae6ab6aa64049fa4581 to your computer and use it in GitHub Desktop.
Copy classes from alternative target
copyProbeClasses := {
val log = streams.value.log
val probeTarget = new File(crossTarget.value, "probe-classes")
(probeTarget ** "*" filter(_.isFile)).get.foreach { fl =>
log.info("Copying " + fl.relativeTo(probeTarget).get.toString)
Files.copy(fl.toPath, new File((classDirectory in Compile).value, fl.relativeTo(probeTarget).get.toString).toPath, REPLACE_EXISTING)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment