【问题标题】:How do I tell SBT-proguard to mark scala-library as "provided"?如何告诉 SBT-proguard 将 scala-library 标记为“已提供”?
【发布时间】:2015-03-24 17:56:58
【问题描述】:

有没有办法将“scala-library”JAR 视为使用 SBT 0.13.7 提供的?

我正在使用 sbt-proguard 来打包我的 JAR,该 JAR 稍后会动态加载到在类路径上已具有适当版本的 scala-library 的应用程序中。

【问题讨论】:

  • 我可以使用 sbt-assembly 和 exclude the scala-library,但我想使用 proguard 在某些时候提供的其他功能。

标签: scala sbt sbt-proguard


【解决方案1】:

sbt-proguard 插件默认吞噬整个世界。如果您不想使用 proguard 处理所有内容(并将其包含在生成的 jar 中),那么您将需要重新定义输入。例如在你的 build.sbt 中有这样的东西:

ProguardKeys.inputs in Proguard <<= exportedProducts in Compile map { _.files }

【讨论】:

    猜你喜欢
    • 2011-11-19
    • 1970-01-01
    • 1970-01-01
    • 2017-03-30
    • 1970-01-01
    • 2017-01-31
    • 2012-06-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多