Package io.micronaut.build.pom
Interface MicronautBomExtension
public interface MicronautBomExtension
Extension to configure BOM projects.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidexcludeFromInlining(String alias, String... dependencies) default voidexcludeFromInlining(String alias, Set<String> dependencies) org.gradle.api.provider.Property<String>Specifies the name of the catalog to use.This property allows overriding the name of the properties which will appear in the BOM, when they differ from the names of properties as defined in the project version catalog.org.gradle.api.provider.SetProperty<String>Defines which aliases shouldn't be lined when importing other catalogs.Defines which aliases shouldn't be lined when importing other catalogs.org.gradle.api.provider.Property<org.gradle.api.specs.Spec<? super org.gradle.api.Project>>Excludes projects from the BOM.org.gradle.api.provider.SetProperty<String>List of project names which shouldn't be included in the BOM.org.gradle.api.provider.Property<Boolean>If set to true and that a version catalog is used in the project declaring the BOM, then the BOM will automatically be generated with elements of the version catalog.org.gradle.api.provider.Property<Boolean>If set to true, the BOM will be added to the generated version catalog.org.gradle.api.provider.Property<Boolean>Determines if the projects to include in the BOM are inferred, in which case it would automatically include projects which apply the publishing plugin.Allows setting a list of modules (group:artifact) which are going to be managed, but for which the version must be inferred from what is in the catalog.Defines which aliases should be lined when importing other catalogs.org.gradle.api.provider.Property<Boolean>Defines if imported catalogs (declared via the `bom.` prefix) should be scanned for entries starting with "micronaut", in which case such entries would be inlined into the current catalog (without version), so that users get type-safe accessors without having to explicitly import the nested catalog.org.gradle.api.provider.Property<Boolean>If set to true and that inline nested catalogs is set to true, then whenever a catalog imports another BOM which is not published alongside a version catalog, then the BOM will be inlined into the current catalog.org.gradle.api.provider.Property<String>Defines the property name of the version of project dependencies, in case it cannot be deduced properly from the root project nameorg.gradle.api.provider.Property<Boolean>If set to true, a Gradle version catalog will be published alongside the BOM file.default voidinferredManagedDependencies(List<String> dependencies) default voidsuppressions(org.gradle.api.Action<? super BomSuppressions> spec)
-
Method Details
-
getCatalogName
org.gradle.api.provider.Property<String> getCatalogName()Specifies the name of the catalog to use. Defaults to "libs"- Returns:
- the catalog to use
-
getExcludeProject
org.gradle.api.provider.Property<org.gradle.api.specs.Spec<? super org.gradle.api.Project>> getExcludeProject()Excludes projects from the BOM. Any call to this method will override the default spec which excludes modules containing the name "bom" or starting with "test-suite".- Returns:
- the exclusion spec
-
getExtraExcludedProjects
org.gradle.api.provider.SetProperty<String> getExtraExcludedProjects()List of project names which shouldn't be included in the BOM. This list is considered in addition to the exclusion spec.- Returns:
- the excluded projects
-
getPublishCatalog
org.gradle.api.provider.Property<Boolean> getPublishCatalog()If set to true, a Gradle version catalog will be published alongside the BOM file.- Returns:
- the catalog property
-
getImportProjectCatalog
org.gradle.api.provider.Property<Boolean> getImportProjectCatalog()If set to true and that a version catalog is used in the project declaring the BOM, then the BOM will automatically be generated with elements of the version catalog.- Returns:
- the project catalog import property
-
getIncludeBomInCatalog
org.gradle.api.provider.Property<Boolean> getIncludeBomInCatalog()If set to true, the BOM will be added to the generated version catalog.- Returns:
- the include bom property
-
getCatalogToPropertyNameOverrides
This property allows overriding the name of the properties which will appear in the BOM, when they differ from the names of properties as defined in the project version catalog. This property should only be used by legacy projects which used old property names.- Returns:
- the mapping from catalog property names to BOOM property names
-
getInlineNestedCatalogs
org.gradle.api.provider.Property<Boolean> getInlineNestedCatalogs()Defines if imported catalogs (declared via the `bom.` prefix) should be scanned for entries starting with "micronaut", in which case such entries would be inlined into the current catalog (without version), so that users get type-safe accessors without having to explicitly import the nested catalog.- Returns:
- the inline property
-
getInlineRegularBOMs
org.gradle.api.provider.Property<Boolean> getInlineRegularBOMs()If set to true and that inline nested catalogs is set to true, then whenever a catalog imports another BOM which is not published alongside a version catalog, then the BOM will be inlined into the current catalog. The aliases which are going to be used are the artifact ids, normalized to catalog property names.- Returns:
- the inline property
-
getExcludedInlinedAliases
org.gradle.api.provider.SetProperty<String> getExcludedInlinedAliases()Defines which aliases shouldn't be lined when importing other catalogs. If empty, no aliases will be inlined except the ones defined ingetInlinedAliases(). If an alias ends with a wildcard, then all aliases starting with the prefix will be excluded. Behaves the same as adding `*` as the key ingetExcludeFromInlining()- Returns:
- the ignored aliases
-
getExcludeFromInlining
Defines which aliases shouldn't be lined when importing other catalogs. If empty, no aliases will be inlined except the ones defined ingetInlinedAliases(). If an alias ends with a wildcard, then all aliases starting with the prefix will be excluded. The key is the artifact id of the catalog/BOM which is inlined- Returns:
- the ignored aliases
-
getInlinedAliases
Defines which aliases should be lined when importing other catalogs. If empty, all aliases will be inlined except the ones defined ingetExcludeFromInlining(). If an alias ends with a wildcard, then all aliases starting with the prefix will be included. The key is the artifact id of the catalog/BOM which is inlined- Returns:
- the ignored aliases
-
getPropertyName
org.gradle.api.provider.Property<String> getPropertyName()Defines the property name of the version of project dependencies, in case it cannot be deduced properly from the root project name- Returns:
- the property name
-
getInferProjectsToInclude
org.gradle.api.provider.Property<Boolean> getInferProjectsToInclude()Determines if the projects to include in the BOM are inferred, in which case it would automatically include projects which apply the publishing plugin.- Returns:
- the infer property
-
getInferredManagedDependencies
Allows setting a list of modules (group:artifact) which are going to be managed, but for which the version must be inferred from what is in the catalog. This can be useful when we know a dependency will be used, but it's not managed by any BOM we include, but it still appears in the dependency graph. The key is `groupId:artifactId` project coordinates and the value is an alias (without `managed-`) to be included. -
inferredManagedDependencies
-
getSuppressions
BomSuppressions getSuppressions() -
suppressions
-
excludeFromInlining
-
excludeFromInlining
-