-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sbt-freestyle cross sbt versioned #28
sbt-freestyle cross sbt versioned #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
val sourceFile = (baseDirectory in LocalRootProject).value / "README.md" | ||
val targetFile = crossTarget.value / s"${name.value}-javadoc.jar" | ||
|
||
IO.copy(Seq(sourceFile -> targetFile), CopyOptions().withOverwrite(true)).toSeq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 0.13 method is still available in sbt 1: https://github.com/sbt/io/blob/v1.0.0/io/src/main/scala/sbt/io/IO.scala#L587-L589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CopyOptions
is also available in any other location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No CopyOptions is sbt 1 only. What I meant is you could use
IO.copy(Seq(sourceFile -> targetFile), overwrite = true).toSeq
in both sbt 0.13 and sbt 1 and avoid the extra source code files/directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
However, now I recall why I had to split them up into different pieces of code. IO.copy
method signature are not compatible among sbt 0.13
and 1.x
.
- 0.13 (3 arguments):
https://github.com/sbt/sbt/blob/0.13/util/io/src/main/scala/sbt/IO.scala#L616 - 1.0 (4 arguments):
https://github.com/sbt/io/blob/v1.0.0/io/src/main/scala/sbt/io/IO.scala#L587
Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Sorry for the noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, thanks anyway :)
Plugin is now cross-versioned to sbt 1.0.1 and 0.13.16.