Package

object Package extends ScalaCommand[PackageOptions] with BuildCommandHelpers
class ScalaCommand[PackageOptions]
trait RestrictableCommand[PackageOptions]
class Command[PackageOptions]
class CaseApp[PackageOptions]
class Object
trait Matchable
class Any
Package.type

Type members

Classlikes

final class NoMainClassFoundForAssemblyError(cause: NoMainClassFoundError) extends BuildException

Inherited classlikes

implicit class EitherBuildExceptionOps[E <: BuildException, T](either: Either[E, T])
Inherited from:
CommandHelpers

Value members

Concrete methods

def assembly(build: Successful, destPath: Path, mainClassOpt: Option[String], extraProvided: Seq[AnyModule], withPreamble: Boolean, alreadyExistsCheck: () => Unit, logger: Logger): Either[BuildException, Unit]
def buildNative(build: Successful, mainClass: String, logger: Logger): Either[BuildException, Path]
override def buildOptions(options: PackageOptions): Option[BuildOptions]
Value parameters:
options

command-specific T options

Returns:

Tries to create BuildOptions based on sharedOptions and exits on error. Override to change this behaviour.

Definition Classes
def docJar(build: Successful, logger: Logger, extraArgs: Seq[String]): Either[BuildException, Path]
def finalBuildOptions(options: PackageOptions): BuildOptions
override def group: String
Definition Classes
Command
override def isRestricted: Boolean
Definition Classes
def linkJs(build: Successful, dest: Path, mainClassOpt: Option[String], addTestInitializer: Boolean, config: ScalaJsLinkerConfig, fullOpt: Boolean, noOpt: Boolean, logger: Logger, scratchDirOpt: Option[Path]): Either[BuildException, Path]
override def name: String
Definition Classes
Command
def providedFiles(build: Successful, provided: Seq[AnyModule], logger: Logger): Either[BuildException, Seq[Path]]

Returns the dependency sub-graph of the provided modules, that is, all their JARs and their transitive dependencies' JARs.

Returns the dependency sub-graph of the provided modules, that is, all their JARs and their transitive dependencies' JARs.

Note that this is not exactly the same as resolving those modules on their own (with their versions): other dependencies in the whole dependency sub-graph may bump versions in the provided dependencies sub-graph here.

Here, among the JARs of the whole dependency graph, we pick the ones that were pulled by the provided modules, and might have been bumped by other modules. This is strictly a subset of the whole dependency graph.

override def runCommand(options: PackageOptions, args: RemainingArgs, logger: Logger): Unit

This should be overridden instead of run when extending ScalaCommand.

This should be overridden instead of run when extending ScalaCommand.

Value parameters:
options

the command's specific set of options

remainingArgs

arguments remaining after parsing options

Definition Classes
override def sharedOptions(options: PackageOptions): Option[SharedOptions]
Definition Classes
def sourceJar(build: Successful, defaultLastModified: Long): Array[Byte]
def withSourceJar[T](build: Successful, defaultLastModified: Long, fileName: String)(f: Path => T): T

Inherited methods

protected def actualCommandName: String

The actual sub-command name that was used. If the sub-command name is a list of strings, space is used as the separator. If argvOpt hasn't been defined, it defaults to name.

The actual sub-command name that was used. If the sub-command name is a list of strings, space is used as the separator. If argvOpt hasn't been defined, it defaults to name.

Inherited from:
ScalaCommand
protected def actualFullCommand: String
Inherited from:
ScalaCommand
protected def baseRunnerName: String
Returns:

the actual Scala CLI base runner name, for SIP it is scala otherwise scala-cli

Inherited from:
ScalaCommand
protected def buildOptionsOrExit(options: PackageOptions): BuildOptions
Inherited from:
ScalaCommand
def complete(args: Seq[String], index: Int): List[CompletionItem]
Inherited from:
CaseApp
override def completer: Completer[T]
Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
def ensureNoDuplicates(): Unit
Inherited from:
CaseApp
override def error(message: Error): Nothing
Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
def exit(code: Int): Nothing
Inherited from:
CaseApp
def expandArgs(args: List[String]): List[String]
Inherited from:
CaseApp
def fullHelpAsked(progName: String): Nothing
Inherited from:
CaseApp
protected def fullRunnerName: String
Returns:

the actual Scala CLI runner name which was run

Inherited from:
ScalaCommand
override def hasFullHelp: Boolean
Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
def hasHelp: Boolean
Inherited from:
CaseApp
def helpAsked(progName: String, maybeOptions: Either[Error, PackageOptions]): Nothing
Inherited from:
CaseApp
override def helpFormat: HelpFormat
Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
def hidden: Boolean
Inherited from:
Command
def ignoreUnrecognized: Boolean
Inherited from:
CaseApp
def main(progName: String, args: Array[String]): Unit
Inherited from:
CaseApp
def main(args: Array[String]): Unit
Inherited from:
CaseApp
def maybePrintGroupHelp(options: PackageOptions): Unit
Inherited from:
ScalaCommand
def maybePrintSimpleScalacOutput(options: PackageOptions, buildOptions: BuildOptions): Unit

Print scalac output if passed options imply no inputs are necessary and raw scalac output is required instead. (i.e. --scalac-option -help)

Print scalac output if passed options imply no inputs are necessary and raw scalac output is required instead. (i.e. --scalac-option -help)

Value parameters:
options

command options

Inherited from:
ScalaCommand
def maybePrintToolsHelp(options: PackageOptions, buildOptions: BuildOptions): Unit
Inherited from:
ScalaCommand
def names: List[List[String]]
Inherited from:
Command
override def parser: Parser[T]
Definition Classes
Inherited from:
RestrictableCommand
protected def progName: String
Returns:

the actual Scala CLI program name which was run

Inherited from:
ScalaCommand
final override def run(options: PackageOptions, remainingArgs: RemainingArgs): Unit

This implementation is final. Override runCommand instead. This logic is invoked at the start of running every ScalaCommand.

This implementation is final. Override runCommand instead. This logic is invoked at the start of running every ScalaCommand.

Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
override def setArgv(argv: Array[String]): Unit
Definition Classes
Inherited from:
ScalaCommand
Inherited from:
CaseApp
def usageAsked(progName: String, maybeOptions: Either[Error, PackageOptions]): Nothing
Inherited from:
CaseApp

Inherited fields

protected var argvOpt: Option[Array[String]]
Inherited from:
ScalaCommand
lazy override val nameFormatter: Formatter[Name]
Inherited from:
ScalaCommand

Extensions

Inherited extensions

extension (successfulBuild: Successful)
def copyOutput(sharedOptions: SharedOptions): Unit

-O -d defaults to --compile-output; if both are defined, --compile-output takes precedence

-O -d defaults to --compile-output; if both are defined, --compile-output takes precedence

Inherited from:
BuildCommandHelpers
def retainedMainClass(logger: Logger, mainClasses: Seq[String]): Either[MainClassError, String]
Inherited from:
BuildCommandHelpers

Implicits

Inherited implicits

final implicit def EitherBuildExceptionOps[E <: BuildException, T](either: Either[E, T]): EitherBuildExceptionOps[E, T]
Inherited from:
CommandHelpers