Skip to content
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

Merged
merged 17 commits into from
Aug 31, 2017
Merged

sbt 1.0 support #19

merged 17 commits into from
Aug 31, 2017

Conversation

lhns
Copy link
Contributor

@lhns lhns commented Aug 23, 2017

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.

Copy link
Member

@eed3si9n eed3si9n left a 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
Copy link
Member

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")
Copy link
Member

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 {

Copy link
Member

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 {
Copy link
Member

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.

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lhns
Copy link
Contributor Author

lhns commented Aug 24, 2017

Nice!
So this is ready for merge now?

@eed3si9n
Copy link
Member

I just did a drive-by review, but we should get ok from @pvlugter.

Copy link
Member

@pvlugter pvlugter left a 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.

@pvlugter pvlugter merged commit a2ca4f4 into sbt:master Aug 31, 2017
@alexarchambault
Copy link

Would a release including that be underway? I'll use it straightaway in coursier/coursier#629.

@wsxarcher
Copy link

A release would be awesome.

@pvlugter
Copy link
Member

pvlugter commented Sep 6, 2017

New release:

addSbtPlugin("com.lightbend.sbt" % "sbt-proguard" % "0.3.0")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants