Following up on my previous post that described a Type-safe dynamic beans factory with Scala 2.10 macros + Dynamic, I’ve modified the syntax of the hack…

  • an_example.scala:

    import scalaxy.beans._
      
    new MyBean().set(foo = 10, bar = 12)
    
  • build.sbt:

    // Only works with 2.10.0+
    scalaVersion := "2.10.0"
      
    // Dependency at compilation-time only (not at runtime).
    libraryDependencies += "com.nativelibs4java" %% "scalaxy-beans" % "0.3-SNAPSHOT" % "provided"
      
    // Scalaxy/Beans snapshots are published on the Sonatype repository.
    resolvers += Resolver.sonatypeRepo("snapshots")
    

… and made it available for use in Maven / Sbt projects.

Sources and tests are available on GitHub in Scalaxy/Beans.

Enjoy!