Skip to content

Commit

Permalink
Define Scala version in build sbt
Browse files Browse the repository at this point in the history
Before this change the local development used
a different version (2.12.18) of scala than the CI.
  • Loading branch information
Jentsch authored Dec 29, 2024
1 parent 17d0073 commit 38853b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
~/.coursier/
key: ${{hashFiles('**/*.sbt')}}
- name: Run tests
run: sbt ++2.12.20 test scripted
run: sbt test scripted
- name: Publish to Maven Central Repository
env:
GITHUB_PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
if: ${{ env.GITHUB_PERSONAL_ACCESS_TOKEN != '' && github.event_name != 'pull_request' }}
run: sbt ++2.12.20 "set every Seq(sonatypeSessionName := \"${{github.workflow}} ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}-$$ 2.12.20\", publishTo := sonatypePublishToBundle.value)" publishSigned sonatypeBundleRelease
run: sbt "set every Seq(sonatypeSessionName := \"${{github.workflow}} ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}-$$ 2.12.20\", publishTo := sonatypePublishToBundle.value)" publishSigned sonatypeBundleRelease
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ enablePlugins(SbtPlugin)

scriptedLaunchOpts += "-Dplugin.version=" + version.value

organization in ThisBuild := "com.thoughtworks.example"
ThisBuild / organization := "com.thoughtworks.example"

name := "sbt-example"

scalaVersion := "2.12.20"

libraryDependencies += "org.scalameta" %% "scalameta" % "4.7.3"

libraryDependencies += scalaOrganization.value % "scala-reflect" % scalaVersion.value % Provided
Expand Down

0 comments on commit 38853b9

Please sign in to comment.