ihub-settings
...About 2 min
ihub-settings
plugin description
ihub-settingsplugin configuration for plugin repository, plugin version, and subproject management, configuration withsettings.gradle.
| Plugin ID | Plugin Name | Plugin Type | Extension Name | 
|---|---|---|---|
| pub.ihub.plugin.ihub-settings | Configure Plugins | Settings[^Settings] | iHubSettings | 
Extended Properties
DSL extension support configuration
| Extended Method | Extended Description | 
|---|---|
| includeProjects | Add Items (Support for Multiple Projects) | 
| prefix | Item Prefix | 
| noPrefix | No items prefix | 
| suffix | Project Suffix | 
| subproject | Include 3 Level Subprojects | 
| onlySubproject | Only three tier subprojects (not including the current one, Level 3 are the main itemsub-item) | 
| skippedDirs | Ignore Level 3 Subproject Directory | 
 gradle.propertiesConfigure support properties
| Property | Description | 
|---|---|
| name | Configure primary project name | 
| iHubSettings.includeDirs | Include project paths, multiple directories ", " split | 
| iHubSettings.skippedDirs | Exclude project paths, multiple directories ", " split | 
| iHubSettings.includeBom | Used to configure the bom component, including all subprojects withihub-publishcomponents | 
| iHubSettings.includeLibs | Publish catalog component switching, | 
| iHubSettings.includeDependencies | Used to configure dependencies' components, based on catalog component configuration | 
Configure the following:
name=demo
iHubSettings.includeDirs=rest,service
iHubSettings.includeBom=ihub-bom
Plugin Installation
Kotlin
plugins {
    id("pub.ihub.plugin.ihub-settings") version "1.6.2"
}
Groovy
plugins {
    id 'pub.ihub.plugin.ihub-settings' version '1.6.2'
}
Configuration Example
Configure Subprojects
- Directory Structure:
+---rest
+---sdk
\---service
- Configure:
Kotlin
import pub.ihub.plugin.IHubSettingsExtension
configure<IHubSettingsExtension> {
    includeProjects("rest", "sdk", "service")
}
Groovy
iHubSettings {
    includeProjects 'rest', 'sdk', 'service'
}
Configure Level 3 Subprojects
- Directory Structure
+---rest
+---service
+---test
\---other
    +---a
    +---b
    \---c
- Configure
Kotlin
import pub.ihub.plugin.IHubSettingsExtension
configure<IHubSettingsExtension> {
    includeProjects("rest", "service").suffix("-suffix")
    includeProjects("test").noPrefix
    includeProjects("other").prefix("prefix-").skippedDirs("c").subproject
    includeProjects("subproject").prefix("prefix-").suffix("-suffix").onlySubproject
}
Groovy
iHubSettings {
    includeProjects 'rest', 'service' suffix '-suffix'
    includeProjects 'test' noPrefix
    includeProjects 'other' prefix 'prefix-' skippedDirs 'c' subproject
    includeProjects 'subproject' prefix 'prefix-' suffix '-suffix' onlySubproject
}
Warning
plugins exclude common non-project directories, build, src, conf, libs, logs, docs, classes, target, out, node_modules, db, gradle
Default Plugin Repositories
Private repository, custom repository configuration seeextension attributes
| Name | Description | Url | 
|---|---|---|
| ProjectDirs | Project Local Plugin | {rootProject.projectDir}/gradle/plugins | 
| MavenLocal | Local Repository | {local}/.m2/repository | 
| AliYunGradle | Aliyun Gradle Agent Repository | https://maven.aliyun.com/repository/gradle-plugin | 
| ReleaseRepo | Private Release Repository | https://repo.xxx.com/release | 
| SnapshotRepo | Private Snapshot repository | https://repo.xxx.com/snapshot | 
| CustomizeRepo | Custom repository | https://repo.xxx.com/repo | 
Default Version
The plugin is configured with ihub series plugins and the following plug-in default versions:
| Plugin | Version | 
|---|---|
| com.gradle.plugin-publish | 1.2.0 | 
| pub.ihub.plugin.* | 1.4.1 | 
| io.freefair.* | 8.0.1 | 
Use plugins without plating numbers to configure below:
Kotlin
plugins {
    id("pub.ihub.plugin")
    id("com.gradle.plugin-publish")
}
Groovy
plugins {
    id 'pub.ihub.plugin'
    id 'com.gradle.plugin-publish'
}
Configure catalog
- Configure the default version directory componentsihubLibs
dependencyResolutionManagement {
    repositories {
        mavenCentral()
    }
    versionCatalogs {
        ihubLibs {
            from "pub.ihub.lib:ihub-libs:${IHubLibsVersion.version}"
        }
    }
}
- Private Snapshot repository
- gradle/libs.versions.tomlfor standard configurations, gradle will be automatically imported, and this plugin will automatically configure other- .versions.tomlfiles such as:- myLibs.versions.toml, generally using standard configuration sufficient to configure
- Private Release Repository

