Skip to content

[deprecated] An xsbt plugin to reflect build properties into source code

License

Notifications You must be signed in to change notification settings

ritschwumm/xsbt-reflect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 .

About

[deprecated] An xsbt plugin to reflect build properties into source code

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages