SBT including the version number in a program

前端 未结 4 1156
春和景丽
春和景丽 2020-12-13 19:36

I want a program I\'m building to be able to report its own version at runtime (e.g. scala myprog.jar --version). Traditionally in a maven project, I\'d use res

4条回答
  •  没有蜡笔的小新
    2020-12-13 20:12

    Use the xsbt-reflect plugin. It will generate a source file that contains, among other things, the project version number.

提交回复
热议问题