score:3
remeber sbt is recursive.
.sbt
define things that are available in the current layer.
.scala
files define thins that will be available in the next layer.
adding an sbt plugin in project/bar.sbt
is adding that plugin to the meta layer, as such the meta-layer that compiles the sbt you are using to compile your project adds those plugins to the next sbt layer.
so if you add a compiler plugin in project/foo.sbt
then you are adding that compiler plugin to the compiler used to compile the project (meta) layer of sbt, but it will not be available in the current layer of sbt. that is the reason why compiler plugins are added in the build.sbt
file, so they are added to the compiler used to compile your code.
Source: stackoverflow.com
Related Query
- Sbt Plugins vs Compiler Plugins
- Is there a way in sbt to convert compiler warnings to errors so the build fails?
- Why does sbt build fail with "MissingRequirementError: object scala.runtime in compiler mirror not found."?
- Does SBT use the Fast Scala Compiler (fsc)?
- Which scala compiler plugins are available?
- SBT Compiler Plugin as Transitive Dependency
- Scala 2.10 compiler takes 10x longer after first time in SBT
- SBT plugins not using custom resolvers
- SBT Plugin: How to add compiler plugin as a dependency that is not propagated downstream?
- How to create a compiler Action for SBT
- What sbt plugins are available for frequent (multiple times per day) releases of a project from git?
- How can I change the compiler flags of an sbt project without causing recompilation?
- How do i enable plugins in sbt subproject build file?
- Can the incremental compiler in sbt be turned off for CI builds?
- How do I force SBT plugins and plugins to be downloaded through Nexus?
- Manually invoke ScalaPB compiler in an SBT task
- Cross-build sbt plugins against different launcher versions?
- Can't fetch plugins from repositories with scala's sbt
- Minimal full SBT project with plugins
- Can NetBeans 8.0 with Scala and sbt plugins installed create sbt project?
- Why does SBT 0.12.2 resolve plugins with Scala 2.9.2 and ignore scalaVersion in build.sbt?
- How to optionally add a compiler plugin in SBT
- how to get a dependency graph of all sbt plugins brought in transitively into one's project?
- Why should I use front-end plugins with my sbt playframework project?
- Scala 2.13, SBT: sbt compile uses wrong compiler version
- how to download sbt plugins from nexus?
- Resolving the dependency of Scala Macros and Compiler Framework in SBT
- Add plugins under a same project in sbt
- Test in Eclipse works but sbt throws MissingRequirementError: object scala.runtime in compiler mirror not found
- SBT Plugin that adds Plugins
More Query from same tag
- How to create a list with the same element n-times?
- MergeSort in scala
- Convert any Scala object to JSON
- Writing Custom Spark functions on Spark columns/ Dataframe
- How to filter by Optional types in scala spark dataSets
- DI Binding to a subclass
- Scala-Play Json: How to define a Writes for any Saddle Frame?
- Pattern Matching chooses the wrong case if used with ClassTag
- Can I do structural refinement over a constructor?
- Scala Process with pipe
- how to preserve a object in play framework 2.1
- What is the fp-style way of doing "naive hashmap"
- How to filter an rdd by data type?
- Kill a hanging Process from Scala
- Enforce order of JSON results
- Filter a Dataframe using a subset of it and two specific fields in spark/scala
- Scala: Example use for early definition / early initializer / pre-initialized fields
- How to use ScalaQuery to insert a BLOB field?
- Unexpected spark caching behavior
- How to connect SQL Server from play 2.4.6
- How to load the modified classes which has been imported to scalate without jetty-restart?
- Scala NoClassDefFoundError when running from command line
- DataFrame.registerTempTable sql failed
- Scala: How can I make my immutable classes easier to subclass?
- HTML reuse and maintenance with Play! framework
- Macwire dependencies not being fulfilled
- Is it possible to update fields of any case class implementing a common trait
- are multiple features a good use case for logback markers?
- print type of variable in Scala
- Class Not Found running Scala in IntelliJ SBT project