All Downloads are FREE. Search and download functionalities are using the official Maven repository.

almond.launcher.directives.Jvm.scala Maven / Gradle / Ivy

There is a newer version: 0.14.0-RC15
Show newest version
package almond.launcher.directives

import almond.launcher.LauncherParameters

import scala.cli.directivehandler._

@DirectiveGroupName("JVM version")
@DirectiveExamples("//> using jvm 11")
@DirectiveExamples("//> using jvm adopt:11")
@DirectiveExamples("//> using jvm graalvm:21")
@DirectiveUsage(
  "//> using jvm _value_",
  "`//> using jvm` _value_"
)
@DirectiveDescription("Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`")
final case class Jvm(
  jvm: Option[Positioned[String]] = None
) extends HasLauncherParameters {
  def launcherParameters = LauncherParameters(
    jvm = jvm.map(_.value).filter(_.trim.nonEmpty)
  )
}

object Jvm {
  val handler: DirectiveHandler[Jvm] = DirectiveHandler.derive
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy