我已经这样写了autoPlugin
object ThriftIfaceSbt extends AutoPlugin {
override def projectSettings = {
Seq(
crossVersion := {
println(s"Init ThriftIfaceSbt ${name.value}")
CrossVersion.Disabled
},
autoScalaLibrary := false,
resourceDirectories in Compile += baseDirectory.value / "src" / "main" / "thrift"
)
}
}
然后我 publishLocal 并在我的 build.sbt 中尝试
lazy val myProject = (project in file("a")).enablePlugins(ThriftIfaceSbt)
该插件没有应用于项目..我不明白为什么。
SBT有可能默默地忽略我的插件吗?