Configuring default settings
User/System wide default DUB values can be specified in settings.json file.
A settings.json file could look like this:
{ "defaultArchitecture": "x86_64", "defaultCompiler": "ldc" }
The file settings.json can be located in different locations. Last item in list has highest priority.
Windows
%ProgramData%\dub\settings.json
<dub executable folder>\..\etc\dub\settings.json
%APPDATA%\dub\settings.json
%ROOT_PACKAGE_DIR%\dub.settings.json
Posix
/var/lib/dub/settings.json
<dub executable folder>/../etc/dub/settings.json
~/.dub/settings.json
$ROOT_PACKAGE_DIR/dub.settings.json
Settings overview
Name | Type | Description |
---|---|---|
registryUrls |
string[]
|
Search the given registry URL first when resolving dependencies. Can be specified multiple times. Available registry types:
|
skipRegistry |
string
|
Sets a mode for skipping the search on certain package registry types:
|
customCachePaths |
string[]
|
Additional paths that contain packages in subfolders with the pattern "(name)-(version)/(name)/". Can be used to provide prebuilt DUB libraries (e.g. for distribution package maintainers). |
defaultCompiler |
string
|
Specifies the compiler binary to use (can be a path). Arbitrary pre- and suffixes to the identifiers below are recognized (e.g. ldc2 or dmd-2.063) and matched to the proper compiler type: dmd, gdc, ldc, gdmd, ldmd |
defaultArchitecture |
string
|
Force a different architecture (e.g. x86 or x86_64) |