scala

package
v0.0.0-...-c231a73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2016 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSourceFileList

func ExtractSourceFileList(configuration ScalaProject,
	sourceDirectory string) []string

ExtractSourceFileList is a function that reads all of the source files to be compiled from the configuration file and returns a slice of source files to be compiled using the scalac command. Each source file has had the base path appended to it when returned from the function.

func ExtractTestSourceFileList

func ExtractTestSourceFileList(configuration ScalaProject,
	sourceDirectory string) []string

ExtractSourceFileList is a function that reads all of the test project source files to be compiled from the configuration file and returns a slice of source files to be compiled using the scalac command. Each source file has had the base path prepended to it when returned from the function.

Types

type ScalaCommand

type ScalaCommand struct {
	CommandName  string
	ClassPath    []string
	JarFile      string
	MainClass    string
	RunArguments []string
}

ScalaCommand provides a representation of a call to the Scala command.

func GetScalaRunCommand

func GetScalaRunCommand(configuration ScalaProject) ScalaCommand

func GetScalaRunTestCommand

func GetScalaRunTestCommand(configuration ScalaProject) ScalaCommand

func NewDefaultScalaCommand

func NewDefaultScalaCommand() ScalaCommand

NewDefaultScalaCommand returns a ScalaCommand with some default values set.

func (ScalaCommand) GenerateArgumentList

func (command ScalaCommand) GenerateArgumentList() []string

GenerateArgumentList is a method which returns a slice of strings containing the arguments to use when running the scala command.

func (ScalaCommand) GetCommandName

func (command ScalaCommand) GetCommandName() string

GetCommandName is a method which accesses the name of the command to be run.

func (ScalaCommand) String

func (command ScalaCommand) String() string

type ScalaProject

type ScalaProject struct {
	Name                 string
	Version              string
	Description          string
	Language             string
	SourceDirectory      string
	DestinationDirectory string
	ClassPath            []string
	JarFile              string
	MainClass            string
	NoWarnings           bool
	Optimise             bool
	RunArguments         []string
	SourceFiles          []string
	Resources            []common.Resource
	DebuggingInformation string
	Encoding             string
	Target               string
	TestProject          ScalaTestProject
}

ScalaProject is a struct for holding the information required for building or running a Scala project. Name is the name of the project. Version is used for holding the project version number. Description holds a description of the project. Language holds the name of the programming language that the project is written in. SourceDirectory holds the root directory for the project's source code. DestinationDirectory contains the directory that build artifacts are going to be placed in. ClassPath holds a list of items that are part of the class path. SourceFiles holds a list of all of the files to be compiled into the project. DebuggingInformation holds information about the debugging information to be generated. Target specifies the backend to use.

type ScalaProjectBuilder

type ScalaProjectBuilder struct {
	// contains filtered or unexported fields
}

ScalaProjectBuilder represents a class for building a Scala project.

func NewScalaProjectBuilder

func NewScalaProjectBuilder(command ScalacCommand, project ScalaProject) ScalaProjectBuilder

NewScalaProjectBuilder creates a new instance of a ScalaProjectBuilder.

func (ScalaProjectBuilder) BuildProject

func (builder ScalaProjectBuilder) BuildProject(verbose bool) error

BuildProject builds the Java project.

func (ScalaProjectBuilder) ExecutePostBuildTasks

func (builder ScalaProjectBuilder) ExecutePostBuildTasks(verbose bool) error

ExecutePostBuildTasks performs any tasks that need to be carried out after a successful build.

func (ScalaProjectBuilder) ExecutePreBuildTasks

func (builder ScalaProjectBuilder) ExecutePreBuildTasks(verbose bool) error

ExecutePreBuildTasks is used for executing any actions that need to be performed before building the project.

type ScalaProjectRunner

type ScalaProjectRunner struct {
	// contains filtered or unexported fields
}

func NewScalaProjectRunner

func NewScalaProjectRunner(command ScalaCommand, project ScalaProject) ScalaProjectRunner

func (ScalaProjectRunner) RunProject

func (runner ScalaProjectRunner) RunProject() error

type ScalaTestProject

type ScalaTestProject struct {
	SourceFiles          []string
	SourceDirectory      string
	ClassPath            []string
	DestinationDirectory string
	JarFile              string
	MainClass            string
	RunArguments         []string
}

ScalaTestProject provides the structure of a test project. SourceFiles holds the source files that belong to the test project. The base source directory for the test project. SourceDirectory contains the root directory for the test source files. ClassPath holds a list of items that are part of the class path. DestinationDirectory contains the directory that build artifacts are going to be placed in. The jar file to be executed The main class to executed. The arguments to be passed to the jar file or class file to be executed.

type ScalacCommand

type ScalacCommand struct {
	ClassPath            []string
	CommandName          string
	DebuggingInformation string
	Deprecation          bool
	DestinationDirectory string
	Encoding             string
	NoWarnings           bool
	Optimise             bool
	SourceDirectory      string
	SourceFiles          []string
	Target               string
	Verbose              bool
}

ScalacCommand provides all of the information to generate a call to the Scala compiler command.

func GetScalacBuildCommand

func GetScalacBuildCommand(configuration ScalaProject, deprecation bool,
	verbose bool) ScalacCommand

GetScalacBuildCommand is a function for building up a sclac command that can be used for building a scala project. This command is built up using the project configuration and the command line arguments passed in.

func GetScalacTestBuildCommand

func GetScalacTestBuildCommand(configuration ScalaProject, deprecation bool,
	verbose bool) ScalacCommand

func NewDefaultScalacCommand

func NewDefaultScalacCommand() ScalacCommand

func (ScalacCommand) GenerateArgumentList

func (command ScalacCommand) GenerateArgumentList() []string

GenerateArgumentList is a method which returns a slice of strings containing the arguments to use when running the scalac compiler command.

func (ScalacCommand) GetCommandName

func (command ScalacCommand) GetCommandName() string

GetCommandName is a method on a ScalacCommand which accesses the name of the command to be run.

func (ScalacCommand) GetDestinationDirectory

func (command ScalacCommand) GetDestinationDirectory() string

GetDestinationDirectory is a method on a ScalacCommand which accesses the Destination Directory command to be run.

func (ScalacCommand) String

func (command ScalacCommand) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL