This is an automated email from the ASF dual-hosted git repository.
olabusayo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil.git
The following commit(s) were added to refs/heads/main by this push:
new 131bf2cce Add Scala 2.13.16 support
131bf2cce is described below
commit 131bf2cce9d9d909081b85ad2370ab0dfc29429e
Author: olabusayoT <[email protected]>
AuthorDate: Thu Feb 13 18:29:39 2025 -0500
Add Scala 2.13.16 support
- update build.sbt and github actions
- update release candidate, sonarcloud
DAFFODIL-2152
---
.github/workflows/main.yml | 11 ++++++++---
.sonar-project.properties | 3 ++-
build.sbt | 4 ++--
containers/release-candidate/src/daffodil-release-candidate | 3 ++-
4 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ada10a81a..d874dbd68 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -40,7 +40,7 @@ jobs:
matrix:
java_distribution: [ temurin ]
java_version: [ 8, 11, 17, 21 ]
- scala_version: [ 2.12.20 ]
+ scala_version: [ 2.13.16, 2.12.20 ]
os: [ ubuntu-22.04, windows-2022, macos-14 ]
exclude:
# only run macos on java 17
@@ -90,7 +90,7 @@ jobs:
SONARSCAN: ${{
matrix.os == 'ubuntu-22.04' &&
matrix.java_version == '17' &&
- matrix.scala_version == '2.12.20' &&
+ matrix.scala_version == '2.13.16' &&
github.event_name == 'push' &&
github.repository == 'apache/daffodil' &&
github.ref == 'refs/heads/main'
@@ -215,6 +215,11 @@ jobs:
- name: Prepare for SonarCloud Scan
if: ${{ env.SONARSCAN == 'true' }}
run: |
+ SCALA_VERSION=${{ matrix.scala_version }}
+ SCALA_BINARY_VERSION=$(echo "$SCALA_VERSION" | cut -d. -f1,2)
+ # NOTE: This is needed by .sonar-project.properties so it can
+ # have the right reportPath per version
+ echo "SCALA_BINARY_VERSION=$SCALA_BINARY_VERSION" >> $GITHUB_ENV
$SBT coverageReport
find . -name scoverage.xml -exec sed -i
's#/home/runner/work/daffodil/daffodil#/github/workspace#g' {} +
@@ -236,7 +241,7 @@ jobs:
matrix:
java_distribution: [ temurin ]
java_version: [ 17 ]
- scala_version: [ 2.12.20 ]
+ scala_version: [ 2.13.16 ]
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
env:
diff --git a/.sonar-project.properties b/.sonar-project.properties
index cc607e0ab..bd2c1eeb7 100644
--- a/.sonar-project.properties
+++ b/.sonar-project.properties
@@ -35,4 +35,5 @@ sonar.java.test.binaries=target/**/test-classes
sonar.java.libraries=../lib_managed/jars/**/*.jar
sonar.java.test.libraries=../lib_managed/jars/**/*.jar
-sonar.scala.coverage.reportPaths=target/scala-2.12/scoverage-report/scoverage.xml
+# SCALA_BINARY_VERSION (major.minor) must be provided externally
+sonar.scala.coverage.reportPaths=target/scala-${SCALA_BINARY_VERSION}/scoverage-report/scoverage.xml
diff --git a/build.sbt b/build.sbt
index f579d660b..3361c050a 100644
--- a/build.sbt
+++ b/build.sbt
@@ -238,8 +238,8 @@ val minSupportedJavaVersion: String =
lazy val commonSettings = Seq(
organization := "org.apache.daffodil",
version := "4.0.0-SNAPSHOT",
- scalaVersion := "2.12.20",
- crossScalaVersions := Seq("2.12.20"),
+ scalaVersion := "2.13.16",
+ crossScalaVersions := Seq("2.13.16", "2.12.20"),
scalacOptions ++= buildScalacOptions(scalaVersion.value),
Test / scalacOptions ++= buildTestScalacOptions(scalaVersion.value),
Compile / compile / javacOptions ++= buildJavacOptions(),
diff --git a/containers/release-candidate/src/daffodil-release-candidate
b/containers/release-candidate/src/daffodil-release-candidate
index 39063c252..c38363faf 100755
--- a/containers/release-candidate/src/daffodil-release-candidate
+++ b/containers/release-candidate/src/daffodil-release-candidate
@@ -234,6 +234,7 @@ pushd $REPO_ROOT/$DAFFODIL_CODE_REPO &> /dev/null
case $PROJECT_REPO in
"daffodil" | "daffodil-sbt")
VERSION=$(grep 'version :=' build.sbt | cut -d\" -f2)
+ SCALA_BINARY_VERSION=$(grep 'scalaVersion :=' build.sbt | cut -d\" -f2 |
cut -d. -f1,2)
;;
"daffodil-vscode")
VERSION=$(grep '"version"' package.json | cut -d\" -f4)
@@ -316,7 +317,7 @@ case $PROJECT_REPO in
rm -rf $DAFFODIL_DOCS_DIR
mkdir -p $DAFFODIL_DOCS_DIR/{javadoc,scaladoc}/
cp -R target/javaunidoc/* $DAFFODIL_DOCS_DIR/javadoc/
- cp -R target/scala-2.12/unidoc/* $DAFFODIL_DOCS_DIR/scaladoc/
+ cp -R target/scala-$SCALA_BINARY_VERSION/unidoc/*
$DAFFODIL_DOCS_DIR/scaladoc/
cp target/tunables.md $DAFFODIL_SITE_DIR/site/
echo "Installing Site Tutorials..."