Interface MicronautBomExtension


public interface MicronautBomExtension
Extension to configure BOM projects.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    excludeFromInlining(String alias, String... dependencies)
     
    default void
    excludeFromInlining(String alias, Set<String> dependencies)
     
    org.gradle.api.provider.Property<String>
    Specifies the name of the catalog to use.
    org.gradle.api.provider.MapProperty<String,String>
    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.
    org.gradle.api.provider.MapProperty<String,Set<String>>
    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.
    org.gradle.api.provider.MapProperty<String,String>
    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.
    org.gradle.api.provider.MapProperty<String,Set<String>>
    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 name
    org.gradle.api.provider.Property<Boolean>
    If set to true, a Gradle version catalog will be published alongside the BOM file.
     
    default void
     
    default void
    suppressions(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

      org.gradle.api.provider.MapProperty<String,String> 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 in getInlinedAliases(). 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 in getExcludeFromInlining()
      Returns:
      the ignored aliases
    • getExcludeFromInlining

      org.gradle.api.provider.MapProperty<String,Set<String>> getExcludeFromInlining()
      Defines which aliases shouldn't be lined when importing other catalogs. If empty, no aliases will be inlined except the ones defined in getInlinedAliases(). 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

      org.gradle.api.provider.MapProperty<String,Set<String>> getInlinedAliases()
      Defines which aliases should be lined when importing other catalogs. If empty, all aliases will be inlined except the ones defined in getExcludeFromInlining(). 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

      org.gradle.api.provider.MapProperty<String,String> 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

      default void inferredManagedDependencies(List<String> dependencies)
    • getSuppressions

      BomSuppressions getSuppressions()
    • suppressions

      default void suppressions(org.gradle.api.Action<? super BomSuppressions> spec)
    • excludeFromInlining

      default void excludeFromInlining(String alias, String... dependencies)
    • excludeFromInlining

      default void excludeFromInlining(String alias, Set<String> dependencies)