-
Notifications
You must be signed in to change notification settings - Fork 25
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 1.0 support #19
sbt 1.0 support #19
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.
Thanks for the contribution.
Added some minor comments.
@@ -1 +1 @@ | |||
sbt.version=0.12.4 | |||
sbt.version=0.13.16 |
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.
I suggest removing build.properties
from scripted tests.
val proguardVersion = SettingKey[String]("proguard-version") | ||
val proguardDirectory = SettingKey[File]("proguard-directory") | ||
val proguardConfiguration = SettingKey[File]("proguard-configuration") | ||
val binaryDeps = TaskKey[Seq[File]]("binaryDeps") |
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 key should have proguard
prefixed, as proguardBinaryDeps
, and use lower cased taskKey[Seq[File]]("...")
.
http://www.scala-sbt.org/1.x/docs/Plugins-Best-Practices.html#Avoid+namespace+clashes
The same for rest of the keys.
|
||
val Proguard = config("proguard").hide | ||
object SbtProguard extends AutoPlugin { | ||
|
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.
AutoPlugin that uses built-in key should include:
override def requires = plugins.JvmPlugin
@@ -1,23 +1,25 @@ | |||
import sbt._ | |||
import sbt.Keys._ | |||
import com.typesafe.sbt.SbtProguard._ | |||
import com.typesafe.sbt.SbtProguard.autoImport._ | |||
import com.typesafe.sbt.SbtProguard | |||
|
|||
object SampleBuild extends Build { |
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.
Build
trait won't work for sbt 1, if we want to run scripted test on it.
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.
LGTM
Nice! |
I just did a drive-by review, but we should get ok from @pvlugter. |
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.
LGTM too. Thanks @LolHens! Nice work.
Would a release including that be underway? I'll use it straightaway in coursier/coursier#629. |
A release would be awesome. |
New release:
|
I replaced all the deprecated operators and changed this to be an autoPlugin and now it compiles with sbt 0.13.16 and sbt 1.0.0
Because of these changes the pr is not compatible with sbt 0.12 anymore.
The tests all pass, and everything seems to work fine, but I am still new to sbt plugin development and have not yet submitted many prs so feedback is appreciated if things are done improperly.