-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.mill
More file actions
73 lines (58 loc) · 1.96 KB
/
Copy pathbuild.mill
File metadata and controls
73 lines (58 loc) · 1.96 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
63
64
65
66
67
68
69
70
71
72
73
//| mvnDeps:
//| - com.goyeau::mill-scalafix::0.6.0
//| mill-version: 1.0.6
package build
import mill.*
import scalalib.*
import scalalib.publish.*
import scalajslib.*
import scalanativelib.*
import com.goyeau.mill.scalafix.ScalafixModule
val gitTag: Option[String] = sys.env.get("GITHUB_REF").flatMap { ref =>
if (ref.startsWith("refs/tags/")) Some(ref.stripPrefix("refs/tags/"))
else None
}
val versionTag = gitTag
.filter(_.startsWith("v"))
.map(_.stripPrefix("v"))
val snapshotVersion = "0.2-SNAPSHOT"
val artefactVersion = versionTag.getOrElse(snapshotVersion)
trait Shared extends PlatformScalaModule, SonatypeCentralPublishModule, ScalafixModule {
def scalaVersion = "3.7.4"
def publishVersion = artefactVersion
def pomSettings = PomSettings(
description = "data comparison library",
organization = "net.reactivecore",
url = "https://github.com/reactivecore/datacomparison",
licenses = Seq(License.`Apache-2.0`),
versionControl = VersionControl.github("reactivecore", "datacomparison"),
developers = Seq(Developer("nob13", "Norbert Schultz", "https://www.reactivecore.de"))
)
override def artifactName = "datacomparison"
override def scalacOptions = Seq(
"-Wunused:all",
"-Wunused:strict-no-implicit-warn",
"-Wconf:any:e",
"-Wconf:msg=unused private member&src=test/*:silent" // Do not care about unused stuff in Testcases
)
}
trait SharedJS extends Shared, ScalaJSModule {
def scalaJSVersion = "1.20.1"
}
trait SharedNative extends Shared, ScalaNativeModule {
override def scalaNativeVersion = "0.5.9"
}
trait SharedTestModule extends TestModule.ScalaTest {
override def scalaTestVersion = "3.2.19"
}
object `package` extends Module {
object jvm extends Shared {
object test extends ScalaTests, SharedTestModule
}
object js extends SharedJS {
object test extends ScalaJSTests, SharedTestModule
}
object native extends SharedNative {
object test extends ScalaNativeTests, SharedTestModule
}
}