-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.sbt
75 lines (64 loc) · 2.1 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
enablePlugins(GitVersioning)
// gwen core & web versions
val gwenVersion = "4.2.2"
val gwenWebVersion = "4.2.6"
git.baseVersion := gwenWebVersion
git.useGitDescribe := true
lazy val gwenSrc = ProjectRef(file("../gwen"), "gwen")
lazy val gwenLib = "org.gweninterpreter" % "gwen" % gwenVersion
val gwenWeb = (project in file("."))
.sourceDependency(gwenSrc, gwenLib)
.settings(
projectSettings,
libraryDependencies ++= mainDependencies ++ testDependencies
)
resolvers ++= Seq(
"Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
)
lazy val projectSettings = Seq(
name := "gwen-web",
description := "Web automation engine for Gwen",
organization := "org.gweninterpreter",
organizationHomepage := Some(url("https://github.com/gwen-interpreter")),
startYear := Some(2014),
licenses += "Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html"),
homepage := Some(url("https://gweninterpreter.org")),
versionScheme := Some("semver-spec"),
scalaVersion := "3.6.2",
crossPaths := false,
trapExit := false,
scalacOptions ++= Seq(
"-feature",
"-language:postfixOps",
"-deprecation"
),
initialize := {
val _ = initialize.value
val javaVersion = sys.props("java.specification.version")
if (javaVersion != "17")
sys.error(s"Java 17 is required to build this project. Found $javaVersion instead")
}
)
lazy val mainDependencies = {
Seq(
"org.seleniumhq.selenium" % "selenium-java" % "4.28.0" excludeAll(
ExclusionRule("org.seleniumhq.selenium", "selenium-ie-driver")
)
)
}
lazy val testDependencies = {
Seq(
"org.scalatest" %% "scalatest" % "3.2.19",
"org.scalatestplus" %% "mockito-4-5" % "3.2.12.0",
"org.mockito" % "mockito-core" % "5.14.2"
).map(_ % Test)
}
Compile / packageBin / mappings ++= Seq(
file("README.md") -> "README.txt",
file("LICENSE") -> "LICENSE.txt",
file("NOTICE") -> "NOTICE.txt",
file("LICENSE-THIRDPARTY") -> "LICENSE-THIRDPARTY.txt",
file("CHANGELOG") -> "CHANGELOG.txt"
)
Test / parallelExecution := false
Test / testOptions += Tests.Argument("-oF")