Abhijit Sarkar
Abhijit Sarkar

Reputation: 24568

Is there a block syntax for sbt ThisBuild scope?

Given a multimodule build.sbt:

ThisBuild / organization := "com.mycompany"
ThisBuild / version := "1.0.0"
ThisBuild / scalaVersion := "2.12.7"
// more global settings

The ThisBuild scope is repeated on every single line. Is there a way to do the following?

ThisBuild {
  organization := "com.mycompany"
  version := "1.0.0"
  scalaVersion := "2.12.7"
}

Upvotes: 0

Views: 128

Answers (1)

ghik
ghik

Reputation: 10764

Probably the closest you can get is:

inThisBuild(Seq(
  organization := "com.mycompany",
  version := "1.0.0",
  scalaVersion := "2.12.7"
))

Upvotes: 1

Related Questions