Implement Project#withId

This commit is contained in:
Dale Wijnand 2017-10-04 13:41:46 +01:00
parent d997fe8043
commit 530c405b2f
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
2 changed files with 13 additions and 0 deletions

View File

@ -177,6 +177,8 @@ sealed trait Project extends ProjectDefinition[ProjectReference] {
*/
def configure(transforms: (Project => Project)*): Project = Function.chain(transforms)(this)
def withId(id: String) = copy(id = id)
/** Sets the base directory for this project.*/
def in(dir: File): Project = copy(base = dir)

11
notes/1.1.0/project-id.md Normal file
View File

@ -0,0 +1,11 @@
[@dwijnand]: https://github.com/dwijnand
[#3601]: https://github.com/sbt/sbt/pull/3601
### Fixes with compatibility implications
### Improvements
- Adds `Project#withId` to change a project's id. [#3601][] by [@dwijnand][]
### Bug fixes