lightbend-labs / dbuild

Multi-project build tool, based on sbt.
https://lightbend-labs.github.io/dbuild
Other
83 stars 14 forks source link

Allow global variables in configuration files #40

Closed dragos closed 11 years ago

dragos commented 11 years ago

As configuration files grow, it may be very handy to be able to define variables, like scalaVersion. Currently, the configuration follows a strict schema, so unknown variables trigger errors.

One possible solution is to have a separate section for variables, and enforce the schema only for build and options subtrees. For instance

{
  vars {
     scalaVersion: 2.11.0-SNAPSHOT
  }
  build: {
    "projects":[
      {
        name:  "scala-lib",
        system: "ivy",
        uri:    "ivy:org.scala-lang#scala-library;"${scalaVersion}
      },...
  }
}
jsuereth commented 11 years ago

+1. I feel we need the ability to configure externally (for jenkins) as well as have good sensible defaults.

I have no good advice for how to fix this though. Maybe we can have a brainstorming session.

jsuereth commented 11 years ago

Ok, pull request issued, there's a workaround release:

Use 0.6.4-josh-hack-1 in your dbuild.properties.