-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
96 lines (90 loc) · 3.16 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Generated with scalagen
import sbtcrossproject.CrossPlugin.autoImport.crossProject
import sbtcrossproject.CrossPlugin.autoImport.CrossType
val scalatestVersion = "3.1.1"
val buildSettings = Seq(
scalaVersion := "2.13.3",
version := "0.3.1",
organization := "io.mwielocha",
organizationName := "mwielocha",
organizationHomepage := Some(url("http://mwielocha.io/")),
scalacOptions ++= Seq(
"-language:postfixOps",
"-language:implicitConversions",
"-deprecation",
"-feature",
"-Yrangepos",
"-language:existentials",
"-language:higherKinds",
"-language:postfixOps",
"-Xmacro-settings:factorio-verbose,factorio-debug"
),
scalafmtOnCompile in ThisBuild := true,
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ =>
false
},
homepage := Some(url("https://github.com/mwielocha/factorio")),
description := "Tiny, compile time dependency injection framework for Scala.",
scmInfo := Some(ScmInfo(url("https://github.com/mwielocha/factorio"), "scm:[email protected]:mwielocha/factorio.git")),
developers := List(
Developer("mwielocha", "Mikolaj Wielocha", "[email protected]", url("https://github.com/mwielocha"))
),
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishConfiguration := publishConfiguration.value.withOverwrite(true),
credentials += Credentials(Path.userHome / ".sbt" / ".sonatype_credentials")
)
lazy val `factorio-annotations` =
crossProject(JSPlatform, JVMPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Pure)
.in(file("factorio-annotations"))
.settings(
buildSettings ++ Seq(
name := "factorio-annotations"
)
)
lazy val `factorio-macro` =
crossProject(JSPlatform, JVMPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Pure)
.in(file("factorio-macro"))
.settings(
buildSettings ++ Seq(
name := "factorio-macro",
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value
)
)
).dependsOn(`factorio-annotations` % "compile->compile;test->test")
lazy val `factorio-core` =
crossProject(JSPlatform, JVMPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Pure)
.in(file("factorio-core"))
.settings(
buildSettings ++ Seq(
name := "factorio-core",
libraryDependencies ++= Seq(
"javax.inject" % "javax.inject" % "1" % Test,
"org.scalatest" %% "scalatest" % scalatestVersion % Test
)
)
).dependsOn(`factorio-annotations`, `factorio-macro` % "compile->compile;test->test")
lazy val factorio = (project in file("."))
.settings(buildSettings ++ Seq(packagedArtifacts := Map.empty))
.aggregate(
`factorio-annotations`.jvm,
`factorio-annotations`.js,
`factorio-core`.jvm,
`factorio-core`.js,
`factorio-macro`.jvm,
`factorio-macro`.js
)