public final class SmithyBuildConfig extends java.lang.Object implements ToSmithyBuilder<SmithyBuildConfig>
Modifier and Type | Class and Description |
---|---|
static class |
SmithyBuildConfig.Builder
Builder used to create a
SmithyBuildConfig . |
Modifier and Type | Method and Description |
---|---|
static SmithyBuildConfig.Builder |
builder() |
java.util.List<java.lang.String> |
getImports()
Gets the paths to all of the models to import.
|
java.util.Optional<java.lang.String> |
getOutputDirectory() |
java.util.Map<java.lang.String,ObjectNode> |
getPlugins()
Gets the globally configured plugins that are applied to every
projection.
|
java.util.Map<java.lang.String,ProjectionConfig> |
getProjections()
Gets all of the configured projections.
|
java.lang.String |
getVersion()
Gets the version of Smithy-Build.
|
boolean |
isIgnoreMissingPlugins()
If a plugin can't be found, Smithy will by default fail the build.
|
static SmithyBuildConfig |
load(java.nio.file.Path file)
Loads a SmithyBuildConfig from a JSON file on disk.
|
SmithyBuildConfig.Builder |
toBuilder()
Take this object and create a builder that contains all of the
current property values of this object.
|
public static SmithyBuildConfig.Builder builder()
SmithyBuildConfig
.public static SmithyBuildConfig load(java.nio.file.Path file)
The file is expected to contain the following structure:
{
"version": "1.0",
"imports": ["foo.json", "baz.json"],
"outputDirectory": "build/output",
"projections": {
"projection-name": {
"transforms": [
{"name": "transform-name", "args": ["argument1", "argument2", "..."]},
{"name": "other-transform"}
},
"plugins": {
"plugin-name": {
"plugin-config": "value"
},
"...": {}
}
}
},
"plugins": {
"plugin-name": {
"plugin-config": "value"
},
"...": {}
}
}
file
- File to load and parse.java.lang.RuntimeException
- if the file cannot be loaded.public SmithyBuildConfig.Builder toBuilder()
ToSmithyBuilder
toBuilder
in interface ToSmithyBuilder<SmithyBuildConfig>
public java.lang.String getVersion()
public java.util.List<java.lang.String> getImports()
Paths can point to individual model files or directories. All models stored in all recursive directories will be imported.
public java.util.Optional<java.lang.String> getOutputDirectory()
public java.util.Map<java.lang.String,ProjectionConfig> getProjections()
public java.util.Map<java.lang.String,ObjectNode> getPlugins()
public boolean isIgnoreMissingPlugins()