From ff5cf9ddbb430dee70ff725786e228b33238c812 Mon Sep 17 00:00:00 2001 From: Hamza Remmal Date: Fri, 15 Aug 2025 09:19:47 +0200 Subject: [PATCH 1/2] chore: use Java 17 when building the scaladoc --- .github/workflows/ci.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 54643f9d0ec1..1db43cf96d83 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -719,6 +719,9 @@ jobs: - name: Cleanup run: .github/workflows/cleanup.sh + - name: Set JDK 17 as default + run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH + - name: Git Checkout uses: actions/checkout@v5 @@ -859,7 +862,7 @@ jobs: scala3-${{ env.RELEASE_TAG }}*.zip \ scala3-${{ env.RELEASE_TAG }}*.tar.gz \ scala3-${{ env.RELEASE_TAG }}*.sha256 \ - scala3-${{ env.RELEASE_TAG }}.msi + scala3-${{ env.RELEASE_TAG }}.msi - name: Publish Release run: ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonaUpload" From 0a2dbf924872ce8dadba52e55ec7837ade28b52f Mon Sep 17 00:00:00 2001 From: Hamza Remmal Date: Fri, 15 Aug 2025 09:32:31 +0200 Subject: [PATCH 2/2] chore: set the version of the java source too --- project/Build.scala | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index 0ce02826aa71..55e48de33e1f 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1406,7 +1406,7 @@ object Build { // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Add all the project's external dependencies libraryDependencies ++= Seq( @@ -1486,7 +1486,7 @@ object Build { // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Add all the project's external dependencies libraryDependencies ++= Seq( @@ -1556,7 +1556,7 @@ object Build { // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Packaging configuration of `scala3-staging` Compile / packageBin / publishArtifact := true, @@ -1613,7 +1613,7 @@ object Build { // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Packaging configuration of `scala3-staging` Compile / packageBin / publishArtifact := true, @@ -1676,7 +1676,7 @@ object Build { "-sourcepath", (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File.pathSeparator), ), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Packaging configuration of the stdlib Compile / packageBin / publishArtifact := true, @@ -1752,7 +1752,7 @@ object Build { "-sourcepath", (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File.pathSeparator), ), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Packaging configuration of the stdlib Compile / packageBin / publishArtifact := true, @@ -2006,7 +2006,7 @@ object Build { // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Add all the project's external dependencies libraryDependencies ++= Seq( @@ -2065,7 +2065,7 @@ object Build { // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Add all the project's external dependencies libraryDependencies ++= Seq( @@ -2146,7 +2146,7 @@ object Build { // TODO: Enable these flags when the new stdlib is explicitelly null checked //Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Wsafe-init"), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Packaging configuration of the stdlib Compile / packageBin / publishArtifact := true, @@ -2267,7 +2267,7 @@ object Build { // TODO: Enable these flags when the new stdlib is explicitelly null checked //Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Wsafe-init"), // Make sure that the produced artifacts have the minimum JVM version in the bytecode - Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion), + Compile / javacOptions ++= Seq("--release", Versions.minimumJVMVersion), Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion), // Packaging configuration of the stdlib Compile / packageBin / publishArtifact := true,