-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3031dd
commit 6f60515
Showing
5 changed files
with
49 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
buildSrc/src/main/kotlin/com/livk/config/AllConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.livk.config | ||
|
||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.api.artifacts.VersionCatalogsExtension | ||
|
||
/** | ||
* <p> | ||
* AllConfig | ||
* </p> | ||
* | ||
* @author livk | ||
* @date 2022/7/11 | ||
*/ | ||
abstract class AllConfiguration : Plugin<Project> { | ||
override fun apply(project: Project) { | ||
val springBootVersion = project.rootProject | ||
.extensions | ||
.getByType(VersionCatalogsExtension::class.java) | ||
.named("libs") | ||
.findVersion("springBoot") | ||
.get() | ||
.displayName | ||
project.configurations.all { config -> | ||
config.resolutionStrategy { strategy -> | ||
strategy.dependencySubstitution { dependency -> | ||
dependency.substitute(dependency.module("org.springframework.boot:spring-boot-starter-tomcat")) | ||
.using(dependency.module("org.springframework.boot:spring-boot-starter-undertow:" + springBootVersion)) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters