1
[info]  [SUCCESSFUL ] org.scala-sbt#xsbt-proguard-plugin;0.1.3!xsbt-proguard-plugin.jar (425ms)
[info] downloading http://repo1.maven.org/maven2/net/sf/proguard/proguard-base/4.8/proguard-base-4.8.jar ...
[info]  [SUCCESSFUL ] net.sf.proguard#proguard-base;4.8!proguard-base.jar (1346ms)
[info] Done updating.

添加后我收到了这些消息

resolvers += Resolver.url("sbt-plugin-releases-scalasbt", url("http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)

addSbtPlugin("org.scala-sbt" % "xsbt-proguard-plugin" % "0.1.3")

到我的.sbt/plugins/build.sbt文件,这让我觉得 proguard 和它的库安装得很好。但是尝试使用proguard或检查min-jar-path只会给我一个错误

[error] Not a valid command: proguard (similar: reload)

或者

[error] Not a valid key: min-jar-path (similar: ivy-paths)

我也试过把同样的东西放进去(proj-directory)/project/build.sbt,但仍然没有运气。还尝试以~/.sbt/plugins/plugins.sbt相同的结果放置它。如果我about在 SBT 提示下尝试,它会告诉我

[info] Available Plugins: ProguardPlugin

然而我似乎根本无法运行它。我究竟做错了什么?

4

1 回答 1

1

缺少“将插件注入所需项目”的步骤:https ://github.com/adamw/xsbt-proguard-plugin#injecting-the-plugin-into-desired-project

于 2013-04-11T07:57:46.443 回答