Documentation ¶
Index ¶
- func ExtractSourceFileList(configuration KotlinProject, sourceDirectory string) []string
- func ExtractTestSourceFileList(configuration KotlinProject, sourceDirectory string) []string
- type KotlinCommand
- type KotlinProject
- type KotlinProjectBuilder
- type KotlinProjectRunner
- type KotlinTests
- type KotlincCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSourceFileList ¶
func ExtractSourceFileList(configuration KotlinProject, 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 kotlinc command. Each source file has had the base path appended to it when returned from the function.
func ExtractTestSourceFileList ¶
func ExtractTestSourceFileList(configuration KotlinProject, sourceDirectory string) []string
ExtractTestSourceFileList is a function that reads all of the test project source files to be compiled from the configuration and returns a slice of source files to be compiled using the kotlinc command. Each source file has had the base path prepended to it when returned from the function.
Types ¶
type KotlinCommand ¶
type KotlinCommand struct { ClassPath []string CommandName string JarFile string MainClass string RunArguments []string }
KotlinCommand contains all of the information required to call the Java command.
func GetKotlinRunCommand ¶
func GetKotlinRunCommand(configuration KotlinProject) KotlinCommand
GetKotlinRunCommand creates a new KotlinCommand based on the configuration passed in as the argument to this function.
func GetKotlinRunTestCommand ¶
func GetKotlinRunTestCommand(configuration KotlinProject) KotlinCommand
func NewDefaultKotlinCommand ¶
func NewDefaultKotlinCommand() KotlinCommand
NewDefaultKotlinCommand returns a KotlinCommand with some default values set.
func (KotlinCommand) GenerateArgumentList ¶
func (command KotlinCommand) GenerateArgumentList() []string
GenerateArgumentList is a method that returns a slice of strings containing the arguments to use when running the Java command.
func (KotlinCommand) GetCommandName ¶
func (command KotlinCommand) GetCommandName() string
GetCommandName is a method which accesses the name of the command to be run.
func (KotlinCommand) String ¶
func (command KotlinCommand) String() string
type KotlinProject ¶
type KotlinProject struct { Name string Version string Description string Language string DestinationDirectory string JarFile string SourceDirectory string OutputFilename string KotlinHome string ClassPath []string SourceFiles []string Resources []common.Resource BuildTarget string RunArguments []string TestProject KotlinTests }
KotlinProject is a struct for holding the information required for building or running a Kotlin Project.
type KotlinProjectBuilder ¶
type KotlinProjectBuilder struct {
// contains filtered or unexported fields
}
KotlinProjectBuilder represents a class for building a Kotlin project.
func NewProjectBuilder ¶
func NewProjectBuilder(command KotlincCommand, project KotlinProject) KotlinProjectBuilder
NewProjectBuilder creates a new instance of a KotlinProjectBuilder.
func (KotlinProjectBuilder) BuildProject ¶
func (builder KotlinProjectBuilder) BuildProject(verbose bool) error
BuildProject builds the Kotlin project.
func (KotlinProjectBuilder) ExecutePostBuildTasks ¶
func (builder KotlinProjectBuilder) ExecutePostBuildTasks(verbose bool) error
ExecutePostBuildTasks performs any tasks that need to be carried out after a successful build.
func (KotlinProjectBuilder) ExecutePreBuildTasks ¶
func (builder KotlinProjectBuilder) ExecutePreBuildTasks(verbose bool) error
ExecutePreBuildTasks is used for executing any actions that need to be performed before building the project.
type KotlinProjectRunner ¶
type KotlinProjectRunner struct {
// contains filtered or unexported fields
}
func NewKotlinProjectRunner ¶
func NewKotlinProjectRunner(command KotlinCommand, project KotlinProject) KotlinProjectRunner
NewKotlinProjectRunner creates a new KotlinProjectRunner
func (KotlinProjectRunner) RunProject ¶
func (runner KotlinProjectRunner) RunProject() error
type KotlinTests ¶
type KotlinTests struct { SourceFiles []string SourceDirectory string DestinationDirectory string OutputFilename string ClassPath []string TestRunner string RunArguments []string }
KotlinTests provides the information to build a test project.
type KotlincCommand ¶
type KotlincCommand struct { BuildTarget string ClassPath []string CommandName string DestinationDirectory string OutputFilename string IncludeRuntime bool SourceDirectory string SourceFiles []string Verbose bool }
KotlincCommand provides a representation of a call to the Kotlin compiler command.
func GetKotlincBuildCommand ¶
func GetKotlincBuildCommand(configuration KotlinProject, verbose bool) KotlincCommand
GetKotlncBuildCommand is a function for building up a kotlinc command that can be used for building a kotlin project. This command is built up using the project configuration and the command line arguments passed in.
func GetKotlincTestBuildCommand ¶
func GetKotlincTestBuildCommand(configuration KotlinProject, verbose bool) KotlincCommand
GetKotlincTestBuildCommand is a function for building up a kotlinc command that can be used for building a Kotlin test project. This command is built up using the project configuration that is passed in as a parmater to this function.
func NewDefaultKotlincCommand ¶
func NewDefaultKotlincCommand() KotlincCommand
NewDefaultKotlincCommand returns a KotlincCommand with some default values set.
func (KotlincCommand) GenerateArgumentList ¶
func (command KotlincCommand) GenerateArgumentList() []string
GenerateArgumentList is a method which returns a slice of strings containing the arguments to use when running the kotlinc compiler command.
func (KotlincCommand) GetCommandName ¶
func (command KotlincCommand) GetCommandName() string
GetCommandName is a method on a KotlincCommand which accesses the name of the command to be run.
func (KotlincCommand) GetDestinationDirectory ¶
func (command KotlincCommand) GetDestinationDirectory() string
GetDestinationDirectory is a method which returns the the destination directory/jar where the compiler's output is going to be copied to
func (KotlincCommand) String ¶
func (command KotlincCommand) String() string