11package build
2+
23import mill._
4+ import mill.scalalib._
35import 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 `
79
810import de.tobiasroeser.mill.vcs.version.VcsVersion
911import com.github.lolgab.mill.mima._
1012
1113val dottyVersion = sys.props.get("dottyVersion")
14+ val scalaVersions = List("2.12.20", "2.13.15", "3.6.2") ++ dottyVersion
1215
13- val scalaVersions = List("2.12.17", "2.13.10", "2.11.12", "3.1.1") ++ dottyVersion
14-
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
16+ trait RequestsJvmModule extends RequestsModule with Mima {
17+ def mimaPreviousArtifacts = Agg(
18+ (
19+ Seq("0.7.0", "0.7.1", "0.8.2")
20+ ++ Option
21+ .when(VcsVersion.vcsState().commitsSinceLastTag != 0)(VcsVersion.vcsState().lastTag)
22+ .flatten
23+ ).map(v => ivy"com.lihaoyi::requests:${v}") : _*
24+ )
2325 override def mimaBinaryIssueFilters = Seq(
2426 ProblemFilter.exclude[ReversedMissingMethodProblem]("requests.BaseSession.send"),
2527 ProblemFilter.exclude[DirectMissingMethodProblem]("requests.Response.string")
2628 )
29+ }
30+ object requests extends Cross[RequestsJvmModule](scalaVersions) {}
31+
32+ /**
33+ * Placeholder for Scala Native module
34+ */
35+ // object native extends Cross[RequestsNativeModule](scalaVersions)
36+ // trait RequestsNativeModule extends RequestsModule with ScalaNativeModule {
37+ // override def scalaNativeVersion = scalaNative
38+ // override def nativeEmbedResources = true
39+
40+ // def ivyDeps =
41+ // super.ivyDeps() ++ Agg(ivy"com.github.lolgab::scala-native-crypto::0.1.0")
42+ // def nativeLinkingOptions = Seq("-lmicrohttpd")
43+
44+ // object test extends ScalaNativeTests with RequestsTestModule {
45+ // def nativeLinkingOptions =
46+ // super.nativeLinkingOptions() ++ Seq("-L/usr/local/opt/openssl@3/lib")
47+ // }
48+ // }
49+
50+ trait RequestsModule extends CrossScalaModule
51+ with PlatformScalaModule
52+ with PublishModule {
53+ def publishVersion = VcsVersion.vcsState().format()
2754
2855 def pomSettings = PomSettings(
2956 description = "Scala port of the popular Python Requests HTTP client",
@@ -32,11 +59,11 @@ trait RequestsModule extends CrossScalaModule with PublishModule with Mima {
3259 licenses = Seq(License.MIT),
3360 versionControl = VersionControl.github("com-lihaoyi", "requests-scala"),
3461 developers = Seq(
35- Developer("lihaoyi", "Li Haoyi","https://github.com/lihaoyi")
62+ Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi")
3663 )
3764 )
3865
39- def ivyDeps = Agg(ivy"com.lihaoyi::geny::1.0.0 ")
66+ def ivyDeps = Agg(ivy"com.lihaoyi::geny::1.1.1 ")
4067
4168 object test extends ScalaTests with TestModule.Utest {
4269 def ivyDeps = Agg(
0 commit comments