-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sc
96 lines (74 loc) · 2.06 KB
/
build.sc
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
import Deps._
import mill._
import mill.scalalib._
import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
import mill.scalalib.scalafmt._
trait CommonPublished extends Common with PublishModule
{
def publishVersion = "1.0.0-SNAPSHOT"
}
object codegen extends CommonPublished
{
def pomSettings = commonPomSettings.copy(description = "generate scala classes")
override def ivyDeps = Agg(
Apache.CommonIO,
Apache.CommonText,
ScalaMeta
)
object test extends CommonTest
{
override def ivyDeps = Agg(ScalaTest)
}
}
object `codegen-spark` extends CommonPublished
{
def pomSettings = commonPomSettings.copy(description = "generate scala classes targeting spark projects")
override def moduleDeps = Seq(codegen)
override def ivyDeps = Agg(
Apache.Spark.Sql
)
object test extends CommonTest
{
override def ivyDeps = Agg(ScalaTest)
}
}
object reflectlib extends CommonPublished
{
def pomSettings = commonPomSettings.copy(description = "generate scala classes")
object test extends CommonTest
{
override def ivyDeps = Agg(ScalaTest)
}
}
trait Common extends SbtModule with ScalafmtModule
{
override def scalaVersion = "2.12.8"
override def scalacOptions = Seq("-deprecation", "-feature", "-unchecked")
def commonPomSettings = PomSettings(
description = "",
organization = "io.github.kostaskougios",
url = "https://bitbucket.org/ariskk/lang-enhance/src/master/",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("kostaskougios", "lang-enhance"),
developers = Seq(
Developer("kostaskougios", "Kostas Kougios", "https://github.com/kostaskougios")
)
)
trait CommonTest extends Tests {
override def testFrameworks = Seq("org.scalatest.tools.Framework")
}
}
object Deps
{
val ScalaMeta = ivy"org.scalameta::scalameta:4.1.9"
val ScalaTest = ivy"org.scalatest::scalatest:3.0.8"
object Apache
{
val CommonIO = ivy"commons-io:commons-io:2.4"
val CommonText = ivy"org.apache.commons:commons-text:1.7"
object Spark {
val Version="2.4.4"
val Sql = ivy"org.apache.spark::spark-sql:$Version"
}
}
}