From cc7702ee9125857882b45d018ecc25bcfc3da98f Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sun, 30 Jan 2022 01:30:40 +0000 Subject: [PATCH] Read default scala from ThisBuild --- core/src/main/scala/org/typelevel/sbt/TypelevelPlugin.scala | 6 +++--- .../main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala/org/typelevel/sbt/TypelevelPlugin.scala b/core/src/main/scala/org/typelevel/sbt/TypelevelPlugin.scala index bc97f146..758abc43 100644 --- a/core/src/main/scala/org/typelevel/sbt/TypelevelPlugin.scala +++ b/core/src/main/scala/org/typelevel/sbt/TypelevelPlugin.scala @@ -57,10 +57,10 @@ object TypelevelPlugin extends AutoPlugin { tlCiReleaseBranches := Seq("main"), Def.derive(tlFatalWarnings := (tlFatalWarningsInCi.value && githubIsWorkflowBuild.value)), githubWorkflowBuildMatrixExclusions ++= { + val defaultScala = (ThisBuild / scalaVersion).value for { - // default scala is last in the list, default java first - scala <- githubWorkflowScalaVersions.value.init - java <- githubWorkflowJavaVersions.value.tail + scala <- githubWorkflowScalaVersions.value.filterNot(_ == defaultScala) + java <- githubWorkflowJavaVersions.value.tail // default java is head } yield MatrixExclude(Map("scala" -> scala, "java" -> java.render)) }, githubWorkflowBuild := { diff --git a/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala b/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala index f0e2590d..d57a1b95 100644 --- a/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala +++ b/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala @@ -145,7 +145,7 @@ object TypelevelSitePlugin extends AutoPlugin { WorkflowJob( "site", "Generate Site", - scalas = List(crossScalaVersions.value.last), + scalas = List((ThisBuild / scalaVersion).value), javas = List(githubWorkflowJavaVersions.value.head), steps = githubWorkflowJobSetup.value.toList ++ tlSiteGenerate.value ++ tlSitePublish.value