Skip to content
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

Add an example for older versions of sbt with explicit plugin installation #13

Merged
merged 2 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scala/single_explicit_plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.bsp/
target/
9 changes: 9 additions & 0 deletions scala/single_explicit_plugin/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name := "scala-example-project-explicit-plugin"
version := "0.0.1"
scalaVersion := "3.1.0"
description := "Example sbt project that compiles using Scala and Sbt"

libraryDependencies ++= Seq(
"net.sourceforge.htmlcleaner" % "htmlcleaner" % "2.26",
"org.scalatest" % "scalatest_2.10" % "1.9.1" % "test"
)
1 change: 1 addition & 0 deletions scala/single_explicit_plugin/project/build.properties
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit and the below plugins.sbt code are the relevant config differences for this version of single.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.2.8
1 change: 1 addition & 0 deletions scala/single_explicit_plugin/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1")
3 changes: 3 additions & 0 deletions scala/single_explicit_plugin/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This example is mostly the same as the one in `scala/single`.
The key difference is that it uses a pre < 1.4+ version of `sbt`.
Those versions of `sbt` require explicit dependency-graph-plugin setup using plugins.sbt.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package example

object Hello extends Greeting with App {
println(greeting)
}

trait Greeting {
lazy val greeting: String = "hello there!"
}
Loading