Repository navigation
Expand file tree
/
Copy pathbuild.sbt
More file actions
62 lines (59 loc) · 2.37 KB
/
Copy pathbuild.sbt
File metadata and controls
62 lines (59 loc) · 2.37 KB
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
import kotlin.Keys._
val KotlincOptions = Seq(
"-opt-in=kotlin.time.ExperimentalTime",
"-Xallow-any-scripts-in-source-roots",
"-Xuse-fir-lt=false",
"-jvm-target",
"21"
)
val KotlinVersion = "2.1.10"
// -----------------------------------------------------------------------------
// scripts subproject: compiles Kotlin .kts scripts and bundles conf resources
// -----------------------------------------------------------------------------
lazy val scripts = project
.in(file("scripts"))
.enablePlugins(KotlinPlugin)
.settings(
name := "aps-scripts",
organization := "org.tmt.aps",
scalaVersion := "3.6.4",
version := "0.1.0-SNAPSHOT",
kotlinVersion := KotlinVersion,
kotlincJvmTarget := "21",
kotlincOptions ++= KotlincOptions,
kotlinLib("stdlib"),
resolvers += "jitpack" at "https://jitpack.io",
// .kts files are sources; .conf files are resources
Compile / unmanagedSourceDirectories := Seq(baseDirectory.value),
Compile / unmanagedSources / excludeFilter := "*.conf",
Compile / unmanagedResourceDirectories := Seq(baseDirectory.value),
Compile / unmanagedResources / includeFilter := "*.conf",
// Exclude sbt's own target/ output directory from resource scanning.
// Without this, copyResources copies target/classes into itself on every
// build, nesting one level deeper each time until the OS filename length
// limit is hit (FileNotFoundException: File name too long).
Compile / unmanagedResources / excludeFilter :=
(Compile / unmanagedResources / excludeFilter).value || new SimpleFileFilter(_.getCanonicalPath.contains("/target/")),
libraryDependencies ++= Seq(
Libs.`esw-ocs-dsl-kt`,
Libs.`esw-ocs-app`
)
)
// -----------------------------------------------------------------------------
// runner subproject: plain Scala, starts the sequencer and keeps JVM alive
// -----------------------------------------------------------------------------
lazy val runner = project
.in(file("runner"))
.dependsOn(scripts)
.settings(
name := "aps-runner",
organization := "org.tmt.aps",
scalaVersion := "3.6.4",
version := "0.1.0-SNAPSHOT",
resolvers += "jitpack" at "https://jitpack.io",
libraryDependencies ++= Seq(
Libs.`esw-ocs-app`
),
Compile / mainClass := Some("aps.SequencerMain"),
fork := true
)