How to iterate over classpath or how to unwrap T? #1782
Answered
by
lefou
Sailsman63
asked this question in
Q&A
Replies: 1 comment 1 reply
-
def copyToLib(): Command[Unit] = T.command {
runClasspath()
.map(_.path) // the path
.filter(p => os.exists(p) && os.isFile(p)) // only existing files
.foreach(p => os.copy.over(p, millSourcePath / "lib" / p.last)) // copy files flat into lib/
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Sailsman63
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Working on trying to construct a staging directory for a full application. I need to place all runtime dependencies in a specific folder, call it
T.dest / "lib"
.runClasspath
is of type[T[Seq[PathRef]]]
. I can't figure out how to access that internalSeq
for the purpose of iterating over it and copying each jar tolib/
Or is there a more idiomatic way of doing this?
Beta Was this translation helpful? Give feedback.
All reactions