forked from com-lihaoyi/requests-scala
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.mill
More file actions
79 lines (66 loc) · 2.62 KB
/
build.mill
File metadata and controls
79 lines (66 loc) · 2.62 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
74
75
76
77
78
79
//| mill-version: 1.1.0-RC1
//| mill-jvm-version: 17
//| mvnDeps:
//| - com.github.lolgab::mill-mima_mill1:0.2.0
package build
import mill._
import scalalib._
import scalanativelib._
import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
import mill.util.VcsVersion
import com.github.lolgab.mill.mima._
val communityBuildDottyVersion = sys.props.get("dottyVersion").toList
val scalaNextVersion = sys.props.get("scalaNextVersion")
val scalaVersions = List("2.12.20", "2.13.15", "3.3.4") ++ scalaNextVersion ++ communityBuildDottyVersion
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 mvnDeps = Seq(mvn"com.lihaoyi::geny::1.1.1")
}
trait RequestsCrossScalaModule extends CrossScalaModule with ScalaModule {
def moduleDir = build.moduleDir / "requests"
def sources = Task.Sources("src")
}
trait RequestsTestModule extends TestModule.Utest {
def mvnDeps = Seq(
mvn"com.lihaoyi::utest::0.7.10",
mvn"com.lihaoyi::ujson::1.3.13",
mvn"com.dimafeng::testcontainers-scala-core:0.43.0"
)
def forkArgs = Seq(
"--add-opens", "java.net.http/jdk.internal.net.http=ALL-UNNAMED"
)
}
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 mvnDeps =
// super.mvnDeps() ++ Seq(mvn"com.github.lolgab::scala-native-crypto::0.1.0")
//
// object test extends ScalaNativeTests with RequestsTestModule
// }
// object native extends Cross[RequestsNativeModule](scalaVersions)
}