Skip to content

Commit 5c589f9

Browse files
committed
chore: Upgrade build deps to ensure compatible with Scala Native
1 parent d71f35d commit 5c589f9

File tree

2 files changed

+44
-17
lines changed

2 files changed

+44
-17
lines changed

.github/workflows/actions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
java: ['11', '17']
18+
java: ['11', '17', '21']
1919
steps:
2020
- uses: actions/checkout@v3
2121
- uses: actions/setup-java@v3
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/setup-java@v3
3535
with:
3636
distribution: 'temurin'
37-
java-version: 11
37+
java-version: 17
3838
- name: Check Binary Compatibility
3939
run: ./mill -i __.mimaReportBinaryIssues
4040

build.mill

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,56 @@
11
package build
2+
23
import mill._
4+
import mill.scalalib._
35
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`
79

810
import de.tobiasroeser.mill.vcs.version.VcsVersion
911
import com.github.lolgab.mill.mima._
1012

1113
val 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

Comments
 (0)