ihub-bom
...About 1 min
ihub-bom
plugin description
ihub-bom
plugin configuration project dependencies version and compatibility management.
Information | Description |
---|---|
Plugin ID | pub.ihub.plugin.ihub-bom |
Plugin Name | Bom Plugin |
Plugin Type | Project [^Project] |
Extension Name | iHubBom |
Plugin Dependencies | ihub,io.spring.dependency-management(used on demand ) |
Plugin Installation
Kotlin
plugins {
id("pub.ihub.plugin.ihub-bom")
}
Groovy
plugins {
id 'pub.ihub.plugin.ihub-bom'
}
Note
If base pluginihub
is installed, there is no need to install individuallyihub-bom
plugin,ihub
plugin is already integratedihub-bom
plugin.
Configuration Example
Import mavenbom
Kotlin
iHubBom {
importBoms {
group("pub.ihub.lib").module("ihub-bom").version("ihub.lib.version")
}
}
Groovy
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")
}
}
}
Groovy
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")
}
}
}
Groovy
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")
}
}
}
Groovy
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")
}
}
}
Groovy
iHubBom {
importBoms {
dependencies {
implementation 'pub.ihub.lib:ihub-core'
}
}
}
see
Configure component capacityKotlin
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"
)
}
}
}
Groovy
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-dependencies to maintain component versions
Default catalog
Default catalog within plugin pub.ihub.lib:ihub-libs to maintain project component aliases and versions, distinct from platformsSee