1
1
package build
2
+
2
3
import mill._
4
+ import mill.scalalib._
3
5
import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
4
- import scalalib._
5
- import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0 `
6
- import $ivy.`com.github.lolgab::mill-mima::0.0.23 `
6
+
7
+ import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.1 `
8
+ import $ivy.`com.github.lolgab::mill-mima::0.0.24 `
7
9
8
10
import de.tobiasroeser.mill.vcs.version.VcsVersion
9
11
import com.github.lolgab.mill.mima._
10
12
11
- val dottyVersion = sys.props.get("dottyVersion")
13
+ val scalaNextVersion = sys.props.get("scalaNextVersion")
14
+ val scalaVersions = List("2.12.20", "2.13.15", "3.3.4") ++ scalaNextVersion
15
+ val scalaNativeVer = "0.5.6"
12
16
13
- val scalaVersions = List("2.12.17", "2.13.10", "2.11.12", "3.1.1") ++ dottyVersion
17
+ trait MimaCheck extends Mima {
18
+ def mimaPreviousVersions = Seq("0.6.9", "0.7.0", "0.7.1", "0.8.0","0.8.2", "0.9.0").distinct
14
19
15
- object requests extends Cross[RequestsModule](scalaVersions)
16
- trait RequestsModule extends CrossScalaModule with PublishModule with Mima {
17
- def publishVersion = VcsVersion.vcsState().format()
18
- def mimaPreviousVersions =
19
- (
20
- Seq("0.7.0", "0.7.1", "0.8.2") ++
21
- Option.when(VcsVersion.vcsState().commitsSinceLastTag != 0)(VcsVersion.vcsState().lastTag).flatten
22
- ).distinct
23
20
override def mimaBinaryIssueFilters = Seq(
24
21
ProblemFilter.exclude[ReversedMissingMethodProblem]("requests.BaseSession.send"),
25
- ProblemFilter.exclude[DirectMissingMethodProblem]("requests.Response.string")
22
+ ProblemFilter.exclude[DirectMissingMethodProblem]("requests.Response.string"),
26
23
)
24
+ }
25
+
26
+ trait RequestsPublishModule extends PublishModule with MimaCheck {
27
+ def artifactName = "requests"
28
+
29
+ def publishVersion = VcsVersion.vcsState().format()
27
30
28
31
def pomSettings = PomSettings(
29
32
description = "Scala port of the popular Python Requests HTTP client",
@@ -32,17 +35,39 @@ trait RequestsModule extends CrossScalaModule with PublishModule with Mima {
32
35
licenses = Seq(License.MIT),
33
36
versionControl = VersionControl.github("com-lihaoyi", "requests-scala"),
34
37
developers = Seq(
35
- Developer("lihaoyi", "Li Haoyi","https://github.com/lihaoyi")
38
+ Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi")
36
39
)
37
40
)
38
41
39
- def ivyDeps = Agg(ivy"com.lihaoyi::geny::1.0.0")
42
+ def ivyDeps = Agg(ivy"com.lihaoyi::geny::1.1.1")
43
+ }
40
44
41
- object test extends ScalaTests with TestModule.Utest {
42
- def ivyDeps = Agg(
43
- ivy"com.lihaoyi::utest::0.7.10",
44
- ivy"com.lihaoyi::ujson::1.3.13",
45
- ivy"com.dimafeng::testcontainers-scala-core:0.41.3"
46
- )
45
+ trait RequestsCrossScalaModule extends CrossScalaModule with ScalaModule {
46
+ def millSourcePath = build.millSourcePath / "requests"
47
+ def sources = T.sources(millSourcePath / "src")
48
+ }
49
+
50
+ trait RequestsTestModule extends TestModule.Utest {
51
+ def ivyDeps = Agg(
52
+ ivy"com.lihaoyi::utest::0.7.10",
53
+ ivy"com.lihaoyi::ujson::1.3.13",
54
+ ivy"com.dimafeng::testcontainers-scala-core:0.41.3"
55
+ )
56
+ }
57
+
58
+ object requests extends Module {
59
+ trait RequestsJvmModule extends RequestsCrossScalaModule with RequestsPublishModule {
60
+ object test extends ScalaTests with RequestsTestModule
47
61
}
62
+ object jvm extends Cross[RequestsJvmModule](scalaVersions)
63
+
64
+ // trait RequestsNativeModule extends ScalaNativeModule with RequestsPublishModule {
65
+ // override def scalaNativeVersion = scalaNativeVer
66
+ //
67
+ // def ivyDeps =
68
+ // super.ivyDeps() ++ Agg(ivy"com.github.lolgab::scala-native-crypto::0.1.0")
69
+ //
70
+ // object test extends ScalaNativeTests with RequestsTestModule
71
+ // }
72
+ // object native extends Cross[RequestsNativeModule](scalaVersions)
48
73
}
0 commit comments