Skip to main content

ihub-bom

Henry...About 1 min

ihub-bom

plugin description

ihub-bomplugin configuration project dependencies version and compatibility management.

InformationDescription
Plugin IDpub.ihub.plugin.ihub-bom
Plugin NameBom Plugin
Plugin TypeProject[^Project]
Extension NameiHubBom
Plugin Dependenciesihub,io.spring.dependency-managementopen in new window(used on demand)

Plugin Installation

Kotlin
plugins {
    id("pub.ihub.plugin.ihub-bom")
}

Note

If base pluginihubis installed, there is no need to install individuallyihub-bomplugin,ihubplugin is already integratedihub-bomplugin.

Configuration Example

Import mavenbom

Kotlin
iHubBom {
    importBoms {
        group("pub.ihub.lib").module("ihub-bom").version("ihub.lib.version")
    }
}

Configure dependencies on default version

Kotlin
iHubBom {
    importBoms {
        dependencyVersions {
            group("pub.ihub.lib").modules("ihub-core", "ihub-process").version("ihub.lib.version")
        }
    }
}

Configure Group Version Policy

Kotlin
iHubBom {
    importBoms {
        groupVersions {
            group("pub.ihub.lib").version("ihub.lib.version")
        }
    }
}

Exclude component dependencies

Kotlin
iHubBom {
    importBoms {
        excludeModules {
            group("org.slf4j").modules("slf4j-api")
            // 支持排除整个组
            group("pub.ihub")
        }
    }
}

Configure Component Dependencies

Kotlin
iHubBom {
    importBoms {
        dependencies {
            implementation("pub.ihub.lib:ihub-core")
        }
    }
}

Configure component capacity seeopen in new window

Kotlin
iHubBom {
    importBoms {
        capabilities {
            // 支持单个组件(org.slf4j:slf4j-ext)、按组(org.slf4j)、按模块名(slf4j-ext)进行配置
            requireCapability("org.slf4j:slf4j-ext", "org.javassist:javassist")
            // 能力可以省略组,默认同组件
            requireCapability(
                "org.springframework.cloud:spring-cloud-starter-openfeign",
                "spring-cloud-starter-loadbalancer"
            )
        }
    }
}

Default platforms

Built in the plugin the default BOM pub.ihub.lib:ihub-dependenciesopen in new window to maintain component versions

Default catalog

Default catalog within plugin pub.ihub.lib:ihub-libsopen in new window to maintain project component aliases and versions, distinct from platformsSeeopen in new window