Package org.cyclonedx.gradle
Class CyclonedxBomExtension
java.lang.Object
org.cyclonedx.gradle.CyclonedxBomExtension
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<String> The environment variable to use to determine the build system URL.abstract org.gradle.api.provider.Property<String> The group of the component that will be used in the BOM.abstract org.gradle.api.provider.Property<String> The name of the component that will be used in the BOM.abstract org.gradle.api.provider.Property<String> The version of the component that will be used in the BOM.abstract org.gradle.api.provider.ListProperty<org.cyclonedx.model.ExternalReference> The external reference that will be used in the BOM.abstract org.gradle.api.provider.Property<Boolean> Whether to include the BOM serial number in the BOM.abstract org.gradle.api.provider.Property<Boolean> Whether to include the build system information in the BOM.abstract org.gradle.api.provider.ListProperty<String> The list of configuration names to include in the BOM.abstract org.gradle.api.provider.Property<Boolean> Whether to include the license text in the BOM.abstract org.gradle.api.provider.Property<Boolean> Whether to include metadata resolution in the BOM.abstract org.gradle.api.provider.ListProperty<String> The list of project names to include in the BOM.abstract org.gradle.api.provider.Property<org.cyclonedx.model.LicenseChoice> The license choice that will be used in the BOM.abstract org.gradle.api.provider.Property<org.cyclonedx.model.OrganizationalEntity> The organizational entity that will be used in the BOM.abstract org.gradle.api.provider.Property<org.cyclonedx.model.Component.Type> The type of the project that will be used in the BOM.abstract org.gradle.api.provider.Property<org.cyclonedx.Version> The schema version of the BOM.abstract org.gradle.api.provider.ListProperty<String> The list of configuration names to skip in the BOM.abstract org.gradle.api.provider.ListProperty<String> The list of project names to skip in the BOM.
-
Constructor Details
-
CyclonedxBomExtension
public CyclonedxBomExtension(org.gradle.api.model.ObjectFactory objects)
-
-
Method Details
-
getComponentGroup
The group of the component that will be used in the BOM. This is typically the group of the project. If not set, the project group will be used.- Returns:
- the group of the component
- See Also:
-
getComponentName
The name of the component that will be used in the BOM. This is typically the name of the project. If not set, the project name will be used.- Returns:
- the name of the component
- See Also:
-
getComponentVersion
The version of the component that will be used in the BOM. This is typically the version of the project. If not set, the project version will be used.- Returns:
- the version of the component
- See Also:
-
getIncludeProjects
The list of project names to include in the BOM. If not set, all projects will be included.- Returns:
- the list of project names to include
-
getSkipProjects
The list of project names to skip in the BOM. If not set, no projects will be skipped.- Returns:
- the list of project names to skip
-
getIncludeConfigs
The list of configuration names to include in the BOM. If not set, all configurations will be included. Regex patterns can be used to match multiple configurations.- Returns:
- the list of configuration names to include
-
getSkipConfigs
The list of configuration names to skip in the BOM. If not set, no configurations will be skipped. Regex patterns can be used to match multiple configurations.- Returns:
- the list of configuration names to skip
-
getSchemaVersion
public abstract org.gradle.api.provider.Property<org.cyclonedx.Version> getSchemaVersion()The schema version of the BOM. It can be one of the supported versions, e.g.,Version.VERSION_16. If not set, it defaults toVersion.VERSION_16.- Returns:
- the schema version of the BOM
- See Also:
-
getIncludeLicenseText
Whether to include the license text in the BOM. If not set, it defaults to false.- Returns:
- true if license text should be included, false otherwise
-
getIncludeMetadataResolution
Whether to include metadata resolution in the BOM. For example, license information. If not set, it defaults to true.- Returns:
- true if metadata resolution should be included, false otherwise
-
getIncludeBomSerialNumber
Whether to include the BOM serial number in the BOM. If not set, it defaults to true.- Returns:
- true if BOM serial number should be included, false otherwise
-
getProjectType
public abstract org.gradle.api.provider.Property<org.cyclonedx.model.Component.Type> getProjectType()The type of the project that will be used in the BOM. It can be one of the types defined inComponent.Type. If not set, it defaults toComponent.Type.LIBRARY.- Returns:
- the type of the project
-
getIncludeBuildSystem
Whether to include the build system information in the BOM. If not set, it defaults to true.- Returns:
- true if build system information should be included, false otherwise
-
getBuildSystemEnvironmentVariable
The environment variable to use to determine the build system URL. If the build system URL needs to be constructed from multiple environment variables a pattern can be set using `buildSystemEnvironmentVariable = '${SERVER}/jobs/${JOB_ID}'`. Note, that when configuring in kotlin or groovy single quotes must be used to prevent the build itself from interpolating that variables.- Returns:
- the environment variable to use to determine the build system
-
getOrganizationalEntity
public abstract org.gradle.api.provider.Property<org.cyclonedx.model.OrganizationalEntity> getOrganizationalEntity()The organizational entity that will be used in the BOM. This is typically the organization that owns the project. If not set, it defaults to an empty organizational entity.- Returns:
- the organizational entity
-
getLicenseChoice
public abstract org.gradle.api.provider.Property<org.cyclonedx.model.LicenseChoice> getLicenseChoice()The license choice that will be used in the BOM. This is typically the license choice of the project. If not set, it defaults to an empty license choice.- Returns:
- the license choice
-
getExternalReferences
public abstract org.gradle.api.provider.ListProperty<org.cyclonedx.model.ExternalReference> getExternalReferences()The external reference that will be used in the BOM. This can be used to link to external resources related to the project. If not set, it defaults to resolution of git remote URL, if available.- Returns:
- the external reference
-