Skip to content

Commit

Permalink
default to springboot 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
endink committed Nov 27, 2023
1 parent 5d7fb17 commit 5497ca2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/Constants.kt
Expand Up @@ -2,7 +2,6 @@ object Constants {
const val projectVersion = "2.0.2"

const val kotlinVersion = "1.9.21"
const val kotlinDSLVersion = "4.1.2" // need match kotlin 1.9.0
const val publishingPluginVersion = "1.3.0"
const val gradlePublishPluginVersion = "1.2.1"
const val testPlugin = false
Expand Down
Expand Up @@ -11,5 +11,5 @@ const val DEFAULT_MYBATIS_GENERATOR_PLUGIN_VERSION = "1.3.10"
const val DEFAULT_MYSQL_CONNECTOR_VERSION = "8.0.33"
const val DEFAULT_KOTLIN_VERSION = "1.9.21"
const val DEFAULT_JDK_VERSION="17"
const val DEFAULT_INFRA_BOM_VERSION="3.1.5"
const val DEFAULT_INFRA_BOM_VERSION="3.2.0"
const val DEFAULT_KSP_VERSION="1.9.20-1.0.14"
15 changes: 15 additions & 0 deletions src/main/kotlin/com/labijie/infra/gradle/InfraPluginExtension.kt
Expand Up @@ -84,6 +84,20 @@ open class InfraPluginExtension @Inject constructor(private val project: Project
}
}

fun forceVersion(version:String, groupPrefix: String, vararg packageNamePrefix: String){
project.configurations.all {
conf->
conf.resolutionStrategy.eachDependency {
details->
if((details.requested.group == groupPrefix) &&
(packageNamePrefix.isEmpty() || packageNamePrefix.any { details.requested.name.startsWith(it) }))
{
details.useVersion(version)
}
}
}
}

fun useDefault(action: Action<in ProjectProperties>) {
val self = this
val properties = ProjectProperties()
Expand All @@ -92,6 +106,7 @@ open class InfraPluginExtension @Inject constructor(private val project: Project
self.isBom(),
properties
)
forceVersion(properties.kotlinVersion, "org.jetbrains.kotlin", "kotlin-stdlib", "kotlin-reflect")
}

fun useGithubAccount(user: String, key: String) {
Expand Down

0 comments on commit 5497ca2

Please sign in to comment.