-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Unify java versions * Unify java versions * Unify java versions * Unify java versions Restore Java 17
- Loading branch information
1 parent
bfe6e28
commit 96417fd
Showing
4 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ package zio.sbt.githubactions | |
|
||
import io.circe.syntax._ | ||
|
||
import zio.sbt.githubactions.ScalaWorkflow.JavaVersion.AdoptJDK18 | ||
import zio.sbt.githubactions.ScalaWorkflow.JavaVersion.JDK11 | ||
|
||
// The original code of the githubactions package was originally copied from the zio-aws-codegen project: | ||
// https://github.com/zio/zio-aws/tree/master/zio-aws-codegen/src/main/scala/zio/aws/codegen/githubactions | ||
|
@@ -217,23 +217,25 @@ object ScalaWorkflow { | |
|
||
case class ScalaVersion(version: String) | ||
|
||
sealed trait JavaVersion { | ||
trait JavaVersion { | ||
val asString: String | ||
} | ||
object JavaVersion { | ||
case object AdoptJDK18 extends JavaVersion { | ||
override val asString: String = "[email protected]" | ||
} | ||
case object ZuluJDK17 extends JavaVersion { | ||
override val asString: String = "[email protected]" | ||
|
||
case class CorrettoJDK(javaVersion: String) extends JavaVersion { | ||
override val asString: String = s"corretto:$javaVersion" | ||
} | ||
|
||
val JDK11: JavaVersion = CorrettoJDK("11") | ||
val JDK17: JavaVersion = CorrettoJDK("17") | ||
val JDK21: JavaVersion = CorrettoJDK("21") | ||
} | ||
|
||
implicit class JobOps(job: Job) { | ||
def matrix( | ||
scalaVersions: Seq[ScalaVersion], | ||
operatingSystems: Seq[OS] = Seq(OS.UbuntuLatest), | ||
javaVersions: Seq[JavaVersion] = Seq(AdoptJDK18) | ||
javaVersions: Seq[JavaVersion] = Seq(JDK11) | ||
): Job = | ||
job.copy( | ||
strategy = Some( | ||
|