maven-shade like plugin for SBT

前端 未结 2 1665
梦如初夏
梦如初夏 2021-01-04 10:48

i\'m rellatively new to the scala and sbt world and i\'m trying to manage all my new projects with sbt rather than using maven. But now i\'m on a point where I dont know fur

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-04 11:37

    sbt-assembly 0.14.0 adds shading support.

    sbt-assembly can shade classes from your projects or from the library dependencies. Backed by Jar Jar Links, bytecode transformation (via ASM) is used to change references to the renamed classes.

    assemblyShadeRules in assembly := Seq(
      ShadeRule.rename("org.apache.commons.io.**" -> "shadeio.@1").inAll
    )
    

提交回复
热议问题