user1078671
user1078671

Reputation:

Other properties in build.properties in SBT

It is recommended to write sbt.version property into project/build.properties file. But i couldn't find any reference about other properties which could be used with this file. Are there any other helpful use cases for build.properties file?

Upvotes: 13

Views: 6908

Answers (2)

dskrvk
dskrvk

Reputation: 1378

Looking at sbt's source code, there are a couple of places where the file is read, but only to retrieve the sbt version. It may also be written back to the file, preserving any other existing content, which means you can use it for other properties, but you'll have to retrieve them yourself, e.g. like here (taken from this answer).

This may all change of course in future versions of sbt.

Upvotes: 0

Eugene Yokota
Eugene Yokota

Reputation: 95624

Prior to sbt 0.9 there used to be more use for this file like this, but it's now used only for sbt.version. Everything else should go into build.sbt or project/*.scala.

Upvotes: 19

Related Questions