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

Cross-build for sbt 2.0.0-M2 #80

Merged
merged 1 commit into from
Oct 27, 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: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
distribution: temurin
java-version: 8
- name: Run tests
run: sbt clean test scripted
run: sbt clean +test +scripted
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ developers := List(
)

enablePlugins(SbtPlugin)
pluginCrossBuild / sbtVersion := "1.3.0" // minimum version we target

scalaVersion := "2.12.20"
crossScalaVersions += "3.3.4"

pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" => "1.5.8"
case _ => "2.0.0-M2"
}
}

versionScheme := Some("semver-spec")

Expand Down
2 changes: 0 additions & 2 deletions src/sbt-test/sbt-license-check/default/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
version := "0.1"

useCoursier := false

TaskKey[Unit]("check") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
version := "0.1"

useCoursier := false

licenseCheckFailBuildOnDisallowedLicense := false
licenseCheckDisallowedLicenses := Seq("Apache-2.0")
licenseCheckDisallowedLicenses := Seq("The BSD License", "The MIT License")
licenseCheckExemptedDependencies := Seq(
("scala-library", "2.12.8"),
("scala-compiler", "2.12.8"),
("scala-reflect", "2.12.8")
("jline", "2.14.6"),
("jsoup", "1.17.2")
)

TaskKey[Unit]("check") := {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
version := "0.1"

useCoursier := false

licenseCheckFailBuildOnDisallowedLicense := true
licenseCheckDisallowedLicenses := Seq("Apache-2.0")
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
version := "0.1"

useCoursier := false

licenseCheckFailBuildOnDisallowedLicense := false
licenseCheckDisallowedLicenses := Seq("Apache-2.0")

TaskKey[Unit]("check") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
if (!last.contains("[warn] | +-Apache-2.0"))
if (!last.contains("warn"))
sys.error("expected warning logging in the log")
}