-
-
Notifications
You must be signed in to change notification settings - Fork 86
/
build.mill
74 lines (60 loc) · 2.48 KB
/
build.mill
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
package build
import mill._
import scalalib._
import scalanativelib._
import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.1`
import $ivy.`com.github.lolgab::mill-mima::0.0.24`
import de.tobiasroeser.mill.vcs.version.VcsVersion
import com.github.lolgab.mill.mima._
val scalaNextVersion = sys.props.get("scalaNextVersion")
val scalaVersions = List("2.12.20", "2.13.15", "3.3.4") ++ scalaNextVersion
val scalaNativeVer = "0.5.6"
trait MimaCheck extends Mima {
def mimaPreviousVersions = Seq("0.6.9", "0.7.0", "0.7.1", "0.8.0","0.8.2", "0.9.0").distinct
override def mimaBinaryIssueFilters = Seq(
ProblemFilter.exclude[ReversedMissingMethodProblem]("requests.BaseSession.send"),
ProblemFilter.exclude[DirectMissingMethodProblem]("requests.Response.string"),
)
}
trait RequestsPublishModule extends PublishModule with MimaCheck {
def artifactName = "requests"
def publishVersion = VcsVersion.vcsState().format()
def pomSettings = PomSettings(
description = "Scala port of the popular Python Requests HTTP client",
organization = "com.lihaoyi",
url = "https://github.com/com-lihaoyi/requests-scala",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("com-lihaoyi", "requests-scala"),
developers = Seq(
Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi")
)
)
def ivyDeps = Agg(ivy"com.lihaoyi::geny::1.1.1")
}
trait RequestsCrossScalaModule extends CrossScalaModule with ScalaModule {
def millSourcePath = build.millSourcePath / "requests"
def sources = T.sources(millSourcePath / "src")
}
trait RequestsTestModule extends TestModule.Utest {
def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.7.10",
ivy"com.lihaoyi::ujson::1.3.13",
ivy"com.dimafeng::testcontainers-scala-core:0.41.3"
)
}
object requests extends Module {
trait RequestsJvmModule extends RequestsCrossScalaModule with RequestsPublishModule {
object test extends ScalaTests with RequestsTestModule
}
object jvm extends Cross[RequestsJvmModule](scalaVersions)
// trait RequestsNativeModule extends ScalaNativeModule with RequestsPublishModule {
// override def scalaNativeVersion = scalaNativeVer
//
// def ivyDeps =
// super.ivyDeps() ++ Agg(ivy"com.github.lolgab::scala-native-crypto::0.1.0")
//
// object test extends ScalaNativeTests with RequestsTestModule
// }
// object native extends Cross[RequestsNativeModule](scalaVersions)
}