-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathREADME
25 lines (18 loc) · 826 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
An sbt plugin to reflect build properties into source code.
This plugin is mostly for demonstration purposes,
for real-world usage you probably want sbt-buildinfo.
To build this code, get and install SBT from
https://github.com/sbt/sbt
Build and publish the plugin:
git clone [email protected]:ritschwumm/xstb-reflect.git
cd xsbt-reflect
sbt publish-local
Add the plugin to your project in project/plugins.sbt:
addSbtPlugin("de.djini" % "xsbt-reflect" % <version>)
Include the plugin in your project's build.sbt:
enablePlugins(ReflectPlugin)
Optionally set package- and class name:
reflectPackage := "my.package"
reflectClass := "ReflectBuild"
With this setup, you can access the name and version of your project
from scala as my.pack.Reflected.name and my.pack.Reflected.version .