You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>An sbt build is executed using the <code>sbt</code> runner, also called "sbt-the-shell-script" to distinguish from other components. Important thing to note is that sbt runner is designed to run <strong>any version</strong> of sbt.</p>
180
+
<p>An sbt build is executed using the <code>sbt</code> runner, also called "sbt-the-shell-script" to distinguish from other components. It's important to note is that sbt runner is designed to run <strong>any version</strong> of sbt.</p>
181
181
<h3id="specifying-sbt-version-with-projectbuildproperties"><aclass="header" href="#specifying-sbt-version-with-projectbuildproperties">Specifying sbt version with project/build.properties</a></h3>
182
-
<p>The sbt runner executes a subcomponent called sbt launcher, which reads <code>project/build.properties</code> to determine the sbt version for the build, and downloads the artifacts if needed:</p>
182
+
<p>The sbt runner executes a subcomponent called sbt launcher, which reads <code>project/build.properties</code> to determine the sbt version for the build, and downloads the artifacts if they haven't been cached:</p>
<p>The sbt server is the actual build tool whose version is specified using <code>project/build.properties</code>. The sbt server acts as a cashier to take commands from sbtn and editors.</p>
<p>The sbt server runs <ahref="https://get-coursier.io/">Couriser</a> as a subcomponent to resolve Scala libary, Scala compiler, and any other library dependencies your build needs.</p>
195
+
<p>The sbt server runs <ahref="https://get-coursier.io/">Couriser</a> as a subcomponent to resolve Scala library, Scala compiler, and any other library dependencies your build needs.</p>
<p>Zinc is the incremental compiler for Scala, developed and maintained by sbt project.
198
-
An often overlooked aspect of Zinc is that Zinc provides a stable API to invoke <strong>any modern versions</strong> of Scala compiler. Combined with the fact that Coursier can resolve any Scala versions, by installing the sbt runner, you can invoke any modern versions of Scala just by writing a single line <code>build.sbt</code>:</p>
198
+
An often overlooked aspect of Zinc is that Zinc provides a stable API to invoke <strong>any modern versions</strong> of Scala compiler. Combined with the fact that Coursier can resolve any Scala version, with sbt we can invoke any modern versions of Scala just by writing a single line <code>build.sbt</code>:</p>
<p>In Scala, a library or a executable programs used be compiled using the Scala compiler, <code>scalac</code>, or so it is documented in <ahref="https://docs.scala-lang.org/scala3/book/taste-hello-world.html">Scala 3 Book</a> at first:</p>
180
+
<p>In Scala, a library or a program is compiled using the Scala compiler, <code>scalac</code>, as documented in the <ahref="https://docs.scala-lang.org/scala3/book/taste-hello-world.html">Scala 3 Book</a>:</p>
<p>This process gets tedious and slow if we were to invoke <code>scalac</code> directly since we'd have to pass all the Scala source file names.</p>
188
188
<p>Furthermore, most non-trivial programs will likely have library dependencies, and will therefore also depend transitively on their dependencies.
189
-
This is doubly compilicated for Scala ecosystem because we have Scala 2.12, 2.13 ecosystem, Scala 3.x ecosystem, JVM, JS, and Native platforms.</p>
190
-
<p>Rather than working with JAR files and <code>scalac</code>, we can avoid the manual toil by introducing a higher-level subproject abstraction and by using a build tool.</p>
189
+
This is doubly complicated for Scala ecosystem because we have Scala 2.12, 2.13 ecosystem, Scala 3.x ecosystem, JVM, JS, and Native platforms.</p>
190
+
<p>Rather than working with JAR files and <code>scalac</code>, we can avoid manual toil by introducing a higher-level subproject abstraction and by using a build tool.</p>
<p><em>sbt</em> is a simple build tool created for Scala and Java.
193
193
It lets us declare subprojects and their various dependencies and custom tasks to ensure that we'll always get a fast, repeatable build.</p>
194
194
<p>To accomplish this goal, sbt does several things:</p>
195
195
<ul>
196
196
<li>The version of sbt itself is tracked in <code>project/build.properties</code>.</li>
197
-
<li>Defines a domain-specific language (DSL) called <strong>build.sbt DSL</strong> that can declare Scala version and other subproject information in <code>build.sbt</code>.</li>
197
+
<li>Defines a domain-specific language (DSL) called <strong>build.sbt DSL</strong> that can declare the Scala version and other subproject information in <code>build.sbt</code>.</li>
198
198
<li>Uses Coursier to fetch subprojects dependencies and their dependencies.</li>
199
199
<li>Invokes Zinc to incrementally compile Scala and Java sources.</li>
200
200
<li>Automatically runs tasks in parallel whenever possible.</li>
201
201
<li>Defines conventions on how packages are published to Maven repositories to interoperate with the wider JVM ecosystem.</li>
202
202
</ul>
203
-
<p>To a large extent, sbt normalizes the commands needed to build a given program or library.</p>
203
+
<p>To a large extent, sbt standardizes the commands needed to build a given program or library.</p>
as opposed to other tools that use configuration file formats like YAML, TOML, and XML.
207
-
Originally developed around 2010 ~ 2013, <code>build.sbt</code> can start almost like a YAML file, declaring just <code>scalaVersion</code> and <code>libraryDependencies</code>,
207
+
Originally developed beween 2010 and 2013, <code>build.sbt</code> can start almost like a YAML file, declaring just <code>scalaVersion</code> and <code>libraryDependencies</code>,
208
208
but it can supports more features to keep the build definition organized as the build grows larger:</p>
209
209
<ul>
210
210
<li>To avoid repeating the same information, like the version number for a library, <code>build.sbt</code> can declare variables using <code>val</code>.</li>
<p>In Scala, a library or a executable programs used be compiled using the Scala compiler, <code>scalac</code>, or so it is documented in <ahref="https://docs.scala-lang.org/scala3/book/taste-hello-world.html">Scala 3 Book</a> at first:</p>
615
+
<p>In Scala, a library or a program is compiled using the Scala compiler, <code>scalac</code>, as documented in the <ahref="https://docs.scala-lang.org/scala3/book/taste-hello-world.html">Scala 3 Book</a>:</p>
<p>This process gets tedious and slow if we were to invoke <code>scalac</code> directly since we'd have to pass all the Scala source file names.</p>
623
623
<p>Furthermore, most non-trivial programs will likely have library dependencies, and will therefore also depend transitively on their dependencies.
624
-
This is doubly compilicated for Scala ecosystem because we have Scala 2.12, 2.13 ecosystem, Scala 3.x ecosystem, JVM, JS, and Native platforms.</p>
625
-
<p>Rather than working with JAR files and <code>scalac</code>, we can avoid the manual toil by introducing a higher-level subproject abstraction and by using a build tool.</p>
624
+
This is doubly complicated for Scala ecosystem because we have Scala 2.12, 2.13 ecosystem, Scala 3.x ecosystem, JVM, JS, and Native platforms.</p>
625
+
<p>Rather than working with JAR files and <code>scalac</code>, we can avoid manual toil by introducing a higher-level subproject abstraction and by using a build tool.</p>
<p><em>sbt</em> is a simple build tool created for Scala and Java.
628
628
It lets us declare subprojects and their various dependencies and custom tasks to ensure that we'll always get a fast, repeatable build.</p>
629
629
<p>To accomplish this goal, sbt does several things:</p>
630
630
<ul>
631
631
<li>The version of sbt itself is tracked in <code>project/build.properties</code>.</li>
632
-
<li>Defines a domain-specific language (DSL) called <strong>build.sbt DSL</strong> that can declare Scala version and other subproject information in <code>build.sbt</code>.</li>
632
+
<li>Defines a domain-specific language (DSL) called <strong>build.sbt DSL</strong> that can declare the Scala version and other subproject information in <code>build.sbt</code>.</li>
633
633
<li>Uses Coursier to fetch subprojects dependencies and their dependencies.</li>
634
634
<li>Invokes Zinc to incrementally compile Scala and Java sources.</li>
635
635
<li>Automatically runs tasks in parallel whenever possible.</li>
636
636
<li>Defines conventions on how packages are published to Maven repositories to interoperate with the wider JVM ecosystem.</li>
637
637
</ul>
638
-
<p>To a large extent, sbt normalizes the commands needed to build a given program or library.</p>
638
+
<p>To a large extent, sbt standardizes the commands needed to build a given program or library.</p>
as opposed to other tools that use configuration file formats like YAML, TOML, and XML.
642
-
Originally developed around 2010 ~ 2013, <code>build.sbt</code> can start almost like a YAML file, declaring just <code>scalaVersion</code> and <code>libraryDependencies</code>,
642
+
Originally developed beween 2010 and 2013, <code>build.sbt</code> can start almost like a YAML file, declaring just <code>scalaVersion</code> and <code>libraryDependencies</code>,
643
643
but it can supports more features to keep the build definition organized as the build grows larger:</p>
644
644
<ul>
645
645
<li>To avoid repeating the same information, like the version number for a library, <code>build.sbt</code> can declare variables using <code>val</code>.</li>
<p><ahref="https://github.com/foundweekends/giter8/wiki/giter8-templates">Giter8 wiki</a> lists over 100 templates that can jump start your new build.</p>
<p>An sbt build is executed using the <code>sbt</code> runner, also called "sbt-the-shell-script" to distinguish from other components. Important thing to note is that sbt runner is designed to run <strong>any version</strong> of sbt.</p>
742
+
<p>An sbt build is executed using the <code>sbt</code> runner, also called "sbt-the-shell-script" to distinguish from other components. It's important to note is that sbt runner is designed to run <strong>any version</strong> of sbt.</p>
743
743
<h3id="specifying-sbt-version-with-projectbuildproperties"><aclass="header" href="#specifying-sbt-version-with-projectbuildproperties">Specifying sbt version with project/build.properties</a></h3>
744
-
<p>The sbt runner executes a subcomponent called sbt launcher, which reads <code>project/build.properties</code> to determine the sbt version for the build, and downloads the artifacts if needed:</p>
744
+
<p>The sbt runner executes a subcomponent called sbt launcher, which reads <code>project/build.properties</code> to determine the sbt version for the build, and downloads the artifacts if they haven't been cached:</p>
<p>The sbt server is the actual build tool whose version is specified using <code>project/build.properties</code>. The sbt server acts as a cashier to take commands from sbtn and editors.</p>
<p>The sbt server runs <ahref="https://get-coursier.io/">Couriser</a> as a subcomponent to resolve Scala libary, Scala compiler, and any other library dependencies your build needs.</p>
757
+
<p>The sbt server runs <ahref="https://get-coursier.io/">Couriser</a> as a subcomponent to resolve Scala library, Scala compiler, and any other library dependencies your build needs.</p>
<p>Zinc is the incremental compiler for Scala, developed and maintained by sbt project.
760
-
An often overlooked aspect of Zinc is that Zinc provides a stable API to invoke <strong>any modern versions</strong> of Scala compiler. Combined with the fact that Coursier can resolve any Scala versions, by installing the sbt runner, you can invoke any modern versions of Scala just by writing a single line <code>build.sbt</code>:</p>
760
+
An often overlooked aspect of Zinc is that Zinc provides a stable API to invoke <strong>any modern versions</strong> of Scala compiler. Combined with the fact that Coursier can resolve any Scala version, with sbt we can invoke any modern versions of Scala just by writing a single line <code>build.sbt</code>:</p>
0 commit comments