Package

Represents a package, including its sub packages.

class Package {}

Constructors

this
deprecated this(Json json_recipe, NativePath root, Package parent, string version_override)
this(PackageRecipe recipe, NativePath root, Package parent, string version_override)

Constructs a Package using an in-memory package recipe.

Members

Functions

addBuildTypeSettings
void addBuildTypeSettings(BuildSettings settings, BuildPlatform platform, string build_type)

Adds build type specific settings to an existing set of build settings.

describe
PackageDescription describe(BuildPlatform platform, string config)
PackageDescription describe(BuildPlatform platform, Compiler compiler, string config)

Returns a description of the package for use in IDEs or build tools.

getAllDependencies
PackageDependency[] getAllDependencies()

Returns a list of all possible dependencies of the package.

getAllDependenciesRange
auto getAllDependenciesRange()
Undocumented in source. Be warned that the author may not have intended to support it.
getBuildSettings
const(BuildSettingsTemplate) getBuildSettings(string config)

Retrieves a build settings template.

getBuildSettings
BuildSettings getBuildSettings(BuildPlatform platform, string config)

Returns all BuildSettings for the given platform and configuration.

getCombinedBuildSettings
BuildSettings getCombinedBuildSettings()

Returns the combination of all build settings for all configurations and platforms.

getDefaultConfiguration
string getDefaultConfiguration(BuildPlatform platform, bool allow_non_library)

Returns the default configuration to build for the given platform.

getDependencies
const(Dependency[string]) getDependencies(string config)

Retrieves all dependencies for a particular configuration.

getInternalSubPackage
deprecated Nullable!PackageRecipe getInternalSubPackage(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
getPlatformConfigurations
string[] getPlatformConfigurations(BuildPlatform platform, bool allow_non_library)

Returns a list of configurations suitable for the given platform.

getSubConfiguration
string getSubConfiguration(string config, Package dependency, BuildPlatform platform)

Returns the selected configuration for a certain dependency.

hasDependency
bool hasDependency(string dependency_name, string config)

Determines if the package has a dependency to a certain package.

simpleLint
void simpleLint()
Undocumented in source. Be warned that the author may not have intended to support it.
storeInfo
void storeInfo()
void storeInfo(NativePath path)

Writes the current recipe contents to a recipe file.

warnOnSpecialCompilerFlags
void warnOnSpecialCompilerFlags()

Searches for use of compiler-specific flags that have generic alternatives.

Properties

basePackage
inout(Package) basePackage [@property getter]

Returns the base package of this package.

configurations
string[] configurations [@property getter]

Returns the list of all build configuration names.

customBuildTypes
string[] customBuildTypes [@property getter]

Returns the list of all custom build type names.

name
string name [@property getter]

Returns the qualified name of the package.

parentPackage
inout(Package) parentPackage [@property getter]

Returns the parent of this package.

path
NativePath path [@property getter]

Returns the directory in which the package resides.

rawRecipe
const(PackageRecipe) rawRecipe [@property getter]

Accesses the original package recipe.

recipe
inout(PackageRecipe) recipe [@property getter]

Accesses the recipe contents of this package.

recipePath
NativePath recipePath [@property getter]

Returns the path to the package recipe file.

subPackages
inout(SubPackage)[] subPackages [@property getter]

Returns the list of all sub packages.

version_
Version version_ [@property getter]
Version version_ [@property setter]

Accesses the version associated with this package.

Static functions

findPackageFile
deprecated NativePath findPackageFile(NativePath directory)

Searches the given directory for package recipe files.

load
deprecated Package load(NativePath root, NativePath recipe_file, Package parent, string version_override, StrictMode mode)

Constructs a Package using a package that is physically present on the local file system.

Variables

m_infoFile
NativePath m_infoFile;
Undocumented in source.

Meta