Skip to content

An xsbt plugin to reflect build properties into source code.

Notifications You must be signed in to change notification settings

sachera/sbt-reflect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An xsbt plugin to reflect build properties into source code.

Forked from https://github.com/harrah/xsbt

To build this code, get and install SBT from https://github.com/dragisak/sbt-reflect


Build and publish the plugin:
    git clone [email protected]:dragisak/sbt-reflect.git
    cd stb-reflect
    sbt publish-local
    
Add the plugin to your project in project/plugins/build.sbt:
	addSbtPlugin("com.github.dragisak" % "sbt-reflect" % "1.1.0")

For sbt 0.12.x, add the plugin to your project in project/plugins/build.sbt:
	addSbtPlugin("com.github.dragisak" % "sbt-reflect" % "1.0.0")
    
Include the plugin in you project's build.sbt:

	seq(ReflectPlugin.allSettings:_*)
	
	reflectPackage	:= "my.pack"
	
	reflectClass	:= "Reflected"
	
	sourceGenerators in Compile <+= reflect map identity

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

An xsbt plugin to reflect build properties into source code.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%