Skip to content

Commit

Permalink
Merge pull request #594 from alexarchambault/enforce-java-8-compat
Browse files Browse the repository at this point in the history
Enforce published modules to be compatible with Java 8, and use JDK 21 on CI
  • Loading branch information
alexarchambault authored Feb 9, 2025
2 parents ff1857f + 3627709 commit 3d0e0bf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 8
jvm: 21
- name: Test
run: ./mill -i '__[${{ matrix.SCALA_VERSION }}].test'

Expand All @@ -36,7 +36,7 @@ jobs:
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 8
jvm: 21
- name: Check
run: ./mill -i __.mimaReportBinaryIssues

Expand All @@ -50,7 +50,7 @@ jobs:
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 8
jvm: 21
apps: scalafmt:3.7.14
- run: scalafmt --check

Expand All @@ -64,7 +64,7 @@ jobs:
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 17
jvm: 21
- run: |
.github/scripts/setup-mkdocs.sh && \
./mill -i docs.mkdocsBuild
Expand All @@ -80,7 +80,7 @@ jobs:
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 8
jvm: 21
- run: .github/scripts/gpg-setup.sh
env:
PGP_SECRET: ${{ secrets.PUBLISH_SECRET_KEY }}
Expand All @@ -105,7 +105,7 @@ jobs:
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 17
jvm: 21
- run: |
.github/scripts/setup-mkdocs.sh && \
./mill -i docs.mkdocsGhDeploy
11 changes: 10 additions & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ trait CaseAppScalaNativeModule extends ScalaNativeModule {
def scalaNativeVersion = Versions.scalaNative
}

trait CaseAppPublishModule extends PublishModule {
trait CaseAppPublishModule extends PublishModule with ScalaModule {
import CaseAppPublishModule._
import mill.scalalib.publish._
def pomSettings = PomSettings(
Expand All @@ -289,6 +289,15 @@ trait CaseAppPublishModule extends PublishModule {
)
)
def publishVersion = T(buildVersion)

def javacOptions = super.javacOptions() ++ Seq(
"--release",
"8"
)
def scalacOptions = super.scalacOptions() ++ Seq(
"--release",
"8"
)
}

object CaseAppPublishModule {
Expand Down

0 comments on commit 3d0e0bf

Please sign in to comment.