Skip to content

Commit 23af097

Browse files
authored
Drop Scala 2.13 (#183)
1 parent 2a16e45 commit 23af097

File tree

2 files changed

+19
-28
lines changed

2 files changed

+19
-28
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
with:
2121
jvm: "temurin:17"
2222
- run: |
23-
./mill -i "__[_].test"
23+
./mill -i "jvm-integration.test"
2424
if: runner.os != 'Windows'
2525
- run: |
26-
@call ./mill.bat -i "__[_].test"
26+
@call ./mill.bat -i "jvm-integration.test"
2727
shell: cmd
2828
if: runner.os == 'Windows'
2929

build.mill.scala

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ object Deps {
3939
}
4040

4141
object Scala {
42-
def scala213 = "2.13.16"
43-
def scala3 = "3.3.6"
42+
def scala3 = "3.3.6"
4443
}
4544

4645
def ghOrg = "VirtusLab"
@@ -60,9 +59,9 @@ trait ScalaCliSigningPublish extends PublishModule {
6059
def publishVersion: Target[String] = finalPublishVersion()
6160
}
6261

63-
object shared extends Cross[Shared](Scala.scala213, Scala.scala3)
64-
trait Shared extends CrossScalaModule with ScalaCliSigningPublish {
65-
override val crossScalaVersion: String = crossValue
62+
object shared extends Shared
63+
trait Shared extends ScalaModule with ScalaCliSigningPublish {
64+
override def scalaVersion: Target[String] = Scala.scala3
6665
def ivyDeps: Target[Agg[Dep]] = super.ivyDeps() ++ Seq(
6766
Deps.jsoniterCore,
6867
Deps.osLib
@@ -100,17 +99,17 @@ trait CliNativeImage extends NativeImage {
10099
}
101100
}
102101

103-
object cli extends Cross[Cli](Scala.scala213, Scala.scala3)
104-
trait Cli extends CrossScalaModule with ScalaCliSigningPublish {
102+
object cli extends Cli
103+
trait Cli extends ScalaModule with ScalaCliSigningPublish {
105104
self =>
106-
override val crossScalaVersion: String = crossValue
105+
override def scalaVersion: Target[String] = Scala.scala3
107106
def ivyDeps: Target[Agg[Dep]] = super.ivyDeps() ++ Seq(
108107
Deps.bouncycastle,
109108
Deps.bouncycastleUtils,
110109
Deps.caseApp,
111110
Deps.coursierPublish // we can probably get rid of that one
112111
)
113-
def moduleDeps: Seq[Shared] = Seq(shared())
112+
def moduleDeps: Seq[Shared] = Seq(shared)
114113
def mainClass: Target[Option[String]] = Some("scala.cli.signing.ScalaCliSigning")
115114

116115
object test extends ScalaTests with TestModule.Munit {
@@ -122,21 +121,14 @@ trait Cli extends CrossScalaModule with ScalaCliSigningPublish {
122121
override def forkArgs: T[Seq[String]] = T {
123122
super.forkArgs() ++ Seq("-Xmx512m", "-Xms128m", "--add-opens=java.base/java.util=ALL-UNNAMED")
124123
}
125-
126-
override def scalaVersion: Target[String] = crossScalaVersion
127124
}
128125
}
129126
object `native-cli` extends ScalaModule with ScalaCliSigningPublish { self =>
130-
private def scalaVer: String = Scala.scala3
131-
def scalaVersion: Target[String] = scalaVer
132-
def ivyDeps: Target[Agg[Dep]] = super.ivyDeps() ++ Seq(
133-
Deps.svm
134-
)
135-
def moduleDeps: Seq[Cli] = Seq(
136-
cli(scalaVer)
137-
)
127+
def scalaVersion: Target[String] = Task(Scala.scala3)
128+
def ivyDeps: Target[Agg[Dep]] = super.ivyDeps() ++ Seq(Deps.svm)
129+
def moduleDeps: Seq[Cli] = Seq(cli)
138130

139-
def mainClass: Target[Option[String]] = cli(scalaVer).mainClass()
131+
def mainClass: Target[Option[String]] = cli.mainClass()
140132

141133
object `base-image` extends CliNativeImage
142134
object `static-image` extends CliNativeImage {
@@ -239,12 +231,11 @@ trait CliTests extends ScalaModule {
239231
}
240232
}
241233

242-
object `jvm-integration` extends Cross[JvmIntegration](Scala.scala213, Scala.scala3)
243-
trait JvmIntegration extends CrossScalaModule with CliTests { self =>
244-
scalaVersion
245-
override val crossScalaVersion: String = crossValue
246-
def testLauncher: Target[PathRef] = cli(crossScalaVersion).launcher()
247-
def cliKind = "jvm"
234+
object `jvm-integration` extends JvmIntegration
235+
trait JvmIntegration extends ScalaModule with CliTests { self =>
236+
override def scalaVersion: Target[String] = Scala.scala3
237+
def testLauncher: Target[PathRef] = cli.launcher()
238+
def cliKind = "jvm"
248239

249240
object test extends Tests
250241
}

0 commit comments

Comments
 (0)