-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
81 lines (74 loc) · 3.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
76
77
78
79
80
81
import BuildSettings._
import Dependencies._
lazy val scramlDslScala = Project(
id = "scraml-dsl-scala",
base = file("modules/scraml-dsl-scala")
).settings (
projSettings(dependencies = scramlDslDepsScala ++ testDeps) ++
Seq(
// Copy all source files into the artifact.
(Compile / unmanagedResourceDirectories) += (Compile / scalaSource).value
)
)
lazy val scramlDslJava = Project(
id = "scraml-dsl-java",
base = file("modules/scraml-dsl-java")
// This is a pure Java project without scala versioning,
// see http://stackoverflow.com/questions/8296280/use-sbt-to-build-pure-java-project
// We also override the crossScalaVersions to avoid publish overwrite problems during release publishing, and because that
// doesn't work (although I think it should), we also override the publishArtifact property.
).settings(
projSettings(dependencies = scramlDslDepsJava ++ testDeps) ++
Seq(
crossPaths := false,
crossScalaVersions := List(BuildSettings.scala2_12),
autoScalaLibrary := false,
// Copy all source files into the artifact.
(Compile / unmanagedResourceDirectories) += (Compile / javaSource).value
)
)
lazy val scramlDslAndroid = Project(
id = "scraml-dsl-android",
base = file("modules/scraml-dsl-android")
// This is a pure Java project without scala versioning,
// see http://stackoverflow.com/questions/8296280/use-sbt-to-build-pure-java-project
// We also override the crossScalaVersions to avoid publish overwrite problems during release publishing, and because that
// doesn't work (although I think it should), we also override the publishArtifact property.
).settings(
projSettings(dependencies = scramlDslDepsAndroid ++ testDeps) ++
Seq(
crossPaths := false,
crossScalaVersions := List(BuildSettings.scala2_12),
autoScalaLibrary := false,
javacOptions ++= Seq("-source", "1.7"), // Android 4 till android 7 and above are on Java 1.7
// Copy all source files into the artifact.
(Compile / unmanagedResourceDirectories) += (Compile / javaSource).value
)
)
lazy val scramlGenSimulation = Project(
id = "scraml-gen-simulation",
base = file("modules/scraml-gen-simulation")
).settings(
projSettings(dependencies = scramlGeneratorDeps ++ testDeps)
) dependsOn (scramlDslScala, scramlDslJava)
lazy val scramlRamlParser = Project(
id = "scraml-raml-parser",
base = file("modules/scraml-raml-parser")
).settings(
projSettings(dependencies = scramlRamlParserDeps ++ testDeps)
)
lazy val scramlGenerator = Project(
id = "scraml-generator",
base = file("modules/scraml-generator")
).settings(
projSettings(dependencies = scramlGeneratorDeps ++ testDeps)
) dependsOn (scramlRamlParser, scramlDslScala, scramlDslJava, scramlDslAndroid)
lazy val main = Project(
id = "scraml-project",
base = file(".")
).settings(
projSettings(dependencies = allDeps),
crossScalaVersions := Nil,
publish := ((): Unit),
publishLocal := ((): Unit)
) aggregate (scramlRamlParser, scramlDslScala, scramlDslJava, scramlDslAndroid, scramlGenSimulation, scramlGenerator)