aboutsummaryrefslogtreecommitdiff
path: root/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts
diff options
context:
space:
mode:
authoraSemy <897017+aSemy@users.noreply.github.com>2023-03-17 15:27:03 +0100
committerGitHub <noreply@github.com>2023-03-17 15:27:03 +0100
commit8bb4f4a86b131e9740a8074cb5775930f8280019 (patch)
tree2fea9f93d621d1a2c72129358a45a565cca68e6c /build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts
parent2a3917b7eb70b39360893b61f5cd7f580c41cfda (diff)
downloaddokka-8bb4f4a86b131e9740a8074cb5775930f8280019.tar.gz
dokka-8bb4f4a86b131e9740a8074cb5775930f8280019.tar.bz2
dokka-8bb4f4a86b131e9740a8074cb5775930f8280019.zip
Introduce Gradle Version Catalog with type-safe project dependencies (#2884)
Diffstat (limited to 'build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts')
-rw-r--r--build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts18
1 files changed, 9 insertions, 9 deletions
diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts
index ec59da7b..4beeab21 100644
--- a/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts
+++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/maven-cli-setup.gradle.kts
@@ -15,7 +15,7 @@ plugins {
base
}
-abstract class SetupMavenProperties {
+abstract class MavenCliSetupExtension {
abstract val mavenVersion: Property<String>
abstract val mavenPluginToolsVersion: Property<String>
abstract val mavenBuildDir: DirectoryProperty
@@ -34,10 +34,10 @@ abstract class SetupMavenProperties {
abstract val mvn: RegularFileProperty
}
-val setupMavenProperties =
- extensions.create("setupMavenProperties", SetupMavenProperties::class).apply {
- mavenVersion.convention(providers.gradleProperty("mavenVersion"))
- mavenPluginToolsVersion.convention(providers.gradleProperty("mavenPluginToolsVersion"))
+val mavenCliSetupExtension =
+ extensions.create("mavenCliSetup", MavenCliSetupExtension::class).apply {
+ mavenVersion.convention(libs.versions.apache.maven)
+ mavenPluginToolsVersion.convention(libs.versions.apache.mavenPluginTools)
mavenBuildDir.convention(layout.buildDirectory.dir("maven"))
mavenInstallDir.convention(layout.buildDirectory.dir("apache-maven"))
@@ -64,7 +64,7 @@ val mavenBinary by configurations.registering {
isVisible = false
defaultDependencies {
- addLater(setupMavenProperties.mavenVersion.map { mavenVersion ->
+ addLater(mavenCliSetupExtension.mavenVersion.map { mavenVersion ->
project.dependencies.create(
group = "org.apache.maven",
name = "apache-maven",
@@ -77,8 +77,8 @@ val mavenBinary by configurations.registering {
}
tasks.clean {
- delete(setupMavenProperties.mavenBuildDir)
- delete(setupMavenProperties.mavenInstallDir)
+ delete(mavenCliSetupExtension.mavenBuildDir)
+ delete(mavenCliSetupExtension.mavenInstallDir)
}
val installMavenBinary by tasks.registering(Sync::class) {
@@ -99,5 +99,5 @@ val installMavenBinary by tasks.registering(Sync::class) {
}
includeEmptyDirs = false
}
- into(setupMavenProperties.mavenInstallDir)
+ into(mavenCliSetupExtension.mavenInstallDir)
}