Skip to content

Commit fcd4da7

Browse files
authored
deps: update all sorts of stuff (#121)
This pr goes through and makes the various updates: - Bumps mill to the latest 0.10.5 - Bumps to the latest Scala versions for 2 and latest 3.1.x version - Drops 0.x support for ScalaJS - Move Scala native to 0.4.x - Adds in dependabot - Starts to cross test on 8 and 17 - Updates checkout and java actions
1 parent 42abf8e commit fcd4da7

File tree

5 files changed

+42
-26
lines changed

5 files changed

+42
-26
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"

.github/workflows/actions.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,27 @@ on:
1313
jobs:
1414
test:
1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
java: ['8', '17']
1619
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-java@v1
20+
- uses: actions/checkout@v3
21+
- uses: actions/setup-java@v3
1922
with:
20-
java-version: 8
23+
distribution: 'temurin'
24+
java-version: ${{ matrix.java }}
2125
- name: Run tests
2226
run: ./mill -i all __.publishArtifacts __.test
27+
2328
check-binary-compatibility:
2429
runs-on: ubuntu-latest
2530
steps:
26-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
2732
with:
2833
fetch-depth: 0
29-
- uses: actions/setup-java@v1
34+
- uses: actions/setup-java@v3
3035
with:
36+
distribution: 'temurin'
3137
java-version: 8
3238
- name: Check Binary Compatibility
3339
run: ./mill -i __.mimaReportBinaryIssues
@@ -45,9 +51,10 @@ jobs:
4551
LC_MESSAGES: "en_US.UTF-8"
4652
LC_ALL: "en_US.UTF-8"
4753
steps:
48-
- uses: actions/checkout@v2
49-
- uses: actions/setup-java@v1
54+
- uses: actions/checkout@v3
55+
- uses: actions/setup-java@v3
5056
with:
57+
distribution: 'temurin'
5158
java-version: 8
5259
- name: Publish to Maven Central
5360
run: |
@@ -72,5 +79,4 @@ jobs:
7279
with:
7380
tag_name: ${{ github.ref }}
7481
release_name: ${{ github.ref }}
75-
body:
7682
draft: false

.mill-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.10.5

build.sc

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
11
import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
22
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4`
33
import de.tobiasroeser.mill.vcs.version.VcsVersion
4-
import $ivy.`com.github.lolgab::mill-mima::0.0.9`
4+
import $ivy.`com.github.lolgab::mill-mima::0.0.10`
55
import com.github.lolgab.mill.mima._
6+
import mill.scalalib.api.Util.isScala3
67

7-
val dottyVersions = sys.props.get("dottyVersion").toList
8+
val dottyCommunityBuildVersion = sys.props.get("dottyVersion").toList
89

9-
val scala2VersionsAndDotty = "2.11.12" :: "2.12.13" :: "2.13.4" :: dottyVersions
10-
val scala30 = "3.0.0"
10+
val scalaVersions =
11+
"2.11.12" :: "2.12.16" :: "2.13.8" :: "3.1.3" :: dottyCommunityBuildVersion
1112

12-
val scalaJSVersions = for {
13-
scalaV <- scala30 :: scala2VersionsAndDotty
14-
scalaJSV <- Seq("0.6.33", "1.5.1")
15-
if scalaV.startsWith("2.") || scalaJSV.startsWith("1.")
16-
} yield (scalaV, scalaJSV)
13+
val scalaJSVersions = scalaVersions.map((_, "1.10.1"))
14+
val scalaNativeVersions = scalaVersions.map((_, "0.4.5"))
1715

18-
val scalaNativeVersions = for {
19-
scalaV <- "3.1.0" :: scala2VersionsAndDotty
20-
scalaNativeV <- Seq("0.4.3")
21-
} yield (scalaV, scalaNativeV)
16+
trait MimaCheck extends Mima {
17+
def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq
18+
}
2219

23-
trait SourcecodeModule extends PublishModule with Mima {
20+
trait SourcecodeModule extends PublishModule with MimaCheck {
2421
def artifactName = "sourcecode"
2522

2623
def publishVersion = VcsVersion.vcsState().format()
2724

28-
def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq
25+
def crossScalaVersion: String
26+
27+
// Temporary until the next version of Mima gets released with
28+
// https://github.com/lightbend/mima/issues/693 included in the release.
29+
def mimaPreviousArtifacts =
30+
if(isScala3(crossScalaVersion)) Agg.empty[Dep] else super.mimaPreviousArtifacts()
2931

3032
def pomSettings = PomSettings(
3133
description = artifactName(),
3234
organization = "com.lihaoyi",
33-
url = "https://github.com/lihaoyi/sourcecode",
35+
url = "https://github.com/com-lihaoyi/sourcecode",
3436
licenses = Seq(License.MIT),
3537
versionControl = VersionControl.github(owner = "com-lihaoyi", repo = "sourcecode"),
3638
developers = Seq(
@@ -82,7 +84,7 @@ trait SourcecodeTestModule extends ScalaModule {
8284
}
8385

8486
object sourcecode extends Module {
85-
object jvm extends Cross[JvmSourcecodeModule](scala30 :: scala2VersionsAndDotty: _*)
87+
object jvm extends Cross[JvmSourcecodeModule](scalaVersions: _*)
8688
class JvmSourcecodeModule(val crossScalaVersion: String)
8789
extends SourcecodeMainModule with ScalaModule with SourcecodeModule {
8890

mill

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This is a wrapper script, that automatically download mill from GitHub release pages
44
# You can give the required mill version with MILL_VERSION env variable
55
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
6-
DEFAULT_MILL_VERSION=0.10.0
6+
DEFAULT_MILL_VERSION=0.10.5
77

88
set -e
99

0 commit comments

Comments
 (0)