我正在浏览sbt手册,我发现您可以设置项目并从val的名称推断位置。 lazy val util = (project in file("util")) 相当于 lazy val util = project 这怎么可能?
lazy val util = (project in file("util"))
lazy val util = project
e0bqpujr1#
宏
/** * Creates a new Project. This is a macro that expects to be assigned directly to a val. * The name of the val is used as the project ID and the name of the base directory of the project. */ def project: Project = macro Project.projectMacroImpl
扩展
到
Project.apply("util", new File("util"))
查看sbt宏展开后创建的内容 project/build.sbt 文件
project/build.sbt
scalacOptions ++= Seq("-Ymacro-debug-lite")
1条答案
按热度按时间e0bqpujr1#
宏
扩展
到
查看sbt宏展开后创建的内容
project/build.sbt
文件