The sbt 🤔
In the "Overview of the Build System & About sbt Settings" series, our next topic is The sbt. Here, we will understand the basics of sbt.
sbt is a task engine. It breaks the tasks into smaller parts so that the processing can be smooth and fast compared to other engines. This makes the sbt a powerful tool, but also, it can create issues if you have come from the other build tool that breaks your build up into coarsely grained tasks.
sbt supports robust and flexible build definitions with a minimal set of ideas. There are not many principles, but there are certain specifics you might miss if you haven't studied the sbt because sbt differs from other build systems in some ways.
Directory Structure📚
Our next topic in the "Overview of the Build System & About sbt Settings" series is Directory Structure. We will learn different types of commands in this section.
If you use the sbt new command, then it will produce a directory structure like this:

🍁 The /app directory
The /app directory carries all the executable artifacts, like Java and Scala source code. There are mainly three packages in the /app directory:
- app/controllers
- app/models
-
app/views
There is also an optional directory named app/assets.
🍁 The /public directory
The /public directory is static assets, and the Web Server directly serves the resources stored in it.
The /public directory splits further into three sub-directories:
- Image
- CSS Stylesheets
- JavaScripts files
🍁 The /conf directory
The /conf directory holds the application's configuration files. There are two main configuration files:
- application.conf: This is the main configuration file in the application.
- routes: This is the routers' definition file.
Delivering it under the conf directory is good if a library needs a specific configuration file in the application.
🍁 The /built.sbt directory
The major build declarations for your project are typically found in /build.sbt at the project's root.
An sbt build file for Play typically looks like this:
name := "foo"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
jdbc,
anorm,
ehcache
)
lazy val root = (project in file(".")).enablePlugins(PlayScala)
🍁 The /project directory
The /project directory, located under your application directory, contains all the info needed to develop your project. It is a prerequisite for the sbt. There are two files in that directory:
- /project/build.properties
- /project/plugins.sbt
sbt Settings 🧑🏻🔧⚙️
In the "Overview of the Build System & About sbt Settings" series, our last topic is sbt Settings.
A software control panel that allows users to configure the appearance or actions in an operating system, application, or hardware is known as sbt Settings. It is used to define the settings for your project.

Use the ":=" operator to set a basic setting:
confDirectory := "myConfFolder"
There are two default settings in sbt settings:
☑️ For Java Applications: Play offers a default set of setting for Java applications. A user can enable this setting by adding the PlayJava plugin using the project's enablePlugins method.
☑️ For Scala Applications: Play also offers a default set of setting for Scala applications. You can enable them by adding the PlayScala plugin using the project's enablePlugins method.
Frequently Asked Questions 🙋🏻

How do I find my sbt build?
You can start or open an sbt project. Locate the build.properties file in the source root directory of the Project tool window and open it in an editor. The version of sbt you want to use for the project must be specified explicitly in the editor.
What is the sbt server?
The sbt server feature was added to sbt 1.x and is still under development. Initially, you might think of a server as something that functions really well and runs on remote servers, but the sbt server is not that at this time.
What is the Scala archetype?
An archetype is a project's overall skeleton structure or template. In some situations, the Scala Maven Plugin offers an archetype for Scala projects. And recall the phrase "convention over configuration."
Conclusion🏅
We have discussed the topic of Overview of the build system & About sbt settings. We have seen the Build System, sbt, and Directory structure and their types along with sbt settings in the "Overview of the build system & About sbt settings" series.
We hope this blog has helped you enhance your knowledge of the Overview of the build system & About sbt settings. If you want to learn more, check out our articles Cookbook, Dictionary, Flowlayout in Java, and many more on our platform Coding Ninjas Studio.
But suppose you have just started your learning process and are looking for questions from tech giants like Amazon, Microsoft, Uber, etc. In that case, you must look at the problems, interview experiences, and interview bundle for placement preparations.
However, you may consider our paid courses to give your career an edge over others!
Happy Learning!
