-
Notifications
You must be signed in to change notification settings - Fork 73
Copy build.sbt from scala/hello-world.g8 #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Sporarum
wants to merge
2
commits into
scala:main
Choose a base branch
from
Sporarum:patch-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,81 @@ | ||
val scala3Version = "3.4.1" | ||
|
||
lazy val root = project | ||
.in(file(".")) | ||
.settings( | ||
name := "$name$", | ||
version := "0.1.0-SNAPSHOT", | ||
// The simplest possible sbt build file is just one line: | ||
|
||
scalaVersion := scala3Version, | ||
scalaVersion := "3.4.1" | ||
// That is, to create a valid sbt build, all you've got to do is define the | ||
// version of Scala you'd like your project to use. | ||
|
||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test | ||
) | ||
// ============================================================================ | ||
|
||
// Lines like the above defining `scalaVersion` are called "settings". Settings | ||
// are key/value pairs. In the case of `scalaVersion`, the key is "scalaVersion" | ||
// and the value is "3.4.1" | ||
|
||
// It's possible to define many kinds of settings, such as: | ||
|
||
name := "scala3" | ||
organization := "ch.epfl.scala" | ||
version := "0.1.0-SNAPSHOT" | ||
|
||
// Note, it's not required for you to define these three settings. These are | ||
// mostly only necessary if you intend to publish your library's binaries on a | ||
// place like Sonatype. | ||
|
||
|
||
// Want to use a published library in your project? | ||
// You can define other libraries as dependencies in your build like this: | ||
|
||
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.3.0" | ||
|
||
// Here, `libraryDependencies` is a set of dependencies, and by using `+=`, | ||
// we're adding the scala-parser-combinators dependency to the set of dependencies | ||
// that sbt will go and fetch when it starts up. | ||
// Now, in any Scala file, you can import classes, objects, etc., from | ||
// scala-parser-combinators with a regular import. | ||
|
||
// TIP: To find the "dependency" that you need to add to the | ||
// `libraryDependencies` set, which in the above example looks like this: | ||
|
||
// "org.scala-lang.modules" %% "scala-parser-combinators" % "2.3.0" | ||
|
||
// You can use Scaladex, an index of all known published Scala libraries. There, | ||
// after you find the library you want, you can just copy/paste the dependency | ||
// information that you need into your build file. For example, on the | ||
// scala/scala-parser-combinators Scaladex page, | ||
// https://index.scala-lang.org/scala/scala-parser-combinators, you can copy/paste | ||
// the sbt dependency from the sbt box on the right-hand side of the screen. | ||
|
||
// IMPORTANT NOTE: while build files look _kind of_ like regular Scala, it's | ||
// important to note that syntax in *.sbt files doesn't always behave like | ||
// regular Scala. For example, notice in this build file that it's not required | ||
// to put our settings into an enclosing object or class. Always remember that | ||
// sbt is a bit different, semantically, than vanilla Scala. | ||
|
||
// ============================================================================ | ||
|
||
// Most moderately interesting Scala projects don't make use of the very simple | ||
// build file style (called "bare style") used in this build.sbt file. Most | ||
// intermediate Scala projects make use of so-called "multi-project" builds. A | ||
// multi-project build makes it possible to have different folders which sbt can | ||
// be configured differently for. That is, you may wish to have different | ||
// dependencies or different testing frameworks defined for different parts of | ||
// your codebase. Multi-project builds make this possible. | ||
|
||
// Here's a quick glimpse of what a multi-project build looks like for this | ||
// build, with only one "subproject" defined, called `root`: | ||
|
||
// val scala3Version = "3.4.1" | ||
// | ||
// lazy val root = project | ||
// .in(file(".")) | ||
// .settings( | ||
// name := "scala3", | ||
// version := "0.1.0-SNAPSHOT", | ||
// | ||
// scalaVersion := scala3Version, | ||
// | ||
// libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test, | ||
// ) | ||
|
||
// To learn more about multi-project builds, head over to the official sbt | ||
// documentation at http://www.scala-sbt.org/documentation.html |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.