aboutsummaryrefslogtreecommitdiff
path: root/runners
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 /runners
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 'runners')
-rw-r--r--runners/cli/build.gradle.kts6
-rw-r--r--runners/gradle-plugin/build.gradle.kts17
-rw-r--r--runners/maven-plugin/build.gradle.kts36
3 files changed, 31 insertions, 28 deletions
diff --git a/runners/cli/build.gradle.kts b/runners/cli/build.gradle.kts
index 5461837e..3afd27fc 100644
--- a/runners/cli/build.gradle.kts
+++ b/runners/cli/build.gradle.kts
@@ -8,9 +8,9 @@ plugins {
}
dependencies {
- implementation("org.jetbrains.kotlinx:kotlinx-cli-jvm:0.3.4")
- implementation(project(":core"))
- implementation(kotlin("stdlib"))
+ implementation(projects.core)
+ implementation(libs.kotlinx.cli)
+
testImplementation(kotlin("test-junit"))
}
diff --git a/runners/gradle-plugin/build.gradle.kts b/runners/gradle-plugin/build.gradle.kts
index 5ce70dcc..51645992 100644
--- a/runners/gradle-plugin/build.gradle.kts
+++ b/runners/gradle-plugin/build.gradle.kts
@@ -8,15 +8,14 @@ plugins {
}
dependencies {
- api(project(":core"))
-
- compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin")
- compileOnly("com.android.tools.build:gradle:4.0.1")
- compileOnly(gradleKotlinDsl())
- testImplementation(project(":test-utils"))
- testImplementation(gradleKotlinDsl())
- testImplementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
- testImplementation("com.android.tools.build:gradle:4.0.1")
+ api(projects.core)
+
+ compileOnly(libs.gradlePlugin.kotlin)
+ compileOnly(libs.gradlePlugin.android)
+
+ testImplementation(projects.testUtils)
+ testImplementation(libs.gradlePlugin.kotlin)
+ testImplementation(libs.gradlePlugin.android)
}
// Gradle will put its own version of the stdlib in the classpath, so not pull our own we will end up with
diff --git a/runners/maven-plugin/build.gradle.kts b/runners/maven-plugin/build.gradle.kts
index 90f2ffef..d91b8889 100644
--- a/runners/maven-plugin/build.gradle.kts
+++ b/runners/maven-plugin/build.gradle.kts
@@ -8,12 +8,12 @@ plugins {
}
dependencies {
- implementation(project(":core"))
- implementation("org.apache.maven:maven-core:${setupMavenProperties.mavenVersion.get()}")
- implementation("org.apache.maven:maven-plugin-api:${setupMavenProperties.mavenVersion.get()}")
- implementation("org.apache.maven.plugin-tools:maven-plugin-annotations:${setupMavenProperties.mavenPluginToolsVersion.get()}")
- implementation("org.apache.maven:maven-archiver:2.5")
- implementation(kotlin("stdlib-jdk8"))
+ implementation(projects.core)
+
+ implementation(libs.apache.mavenCore)
+ implementation(libs.apache.mavenPluginApi)
+ implementation(libs.apache.mavenPluginAnnotations)
+ implementation(libs.apache.mavenArchiver)
}
val mavenPluginTaskGroup = "maven plugin"
@@ -27,8 +27,8 @@ val generatePom by tasks.registering(Sync::class) {
val pomTemplateFile = layout.projectDirectory.file("pom.template.xml")
- val mavenVersion = setupMavenProperties.mavenVersion.get()
- val mavenPluginToolsVersion = setupMavenProperties.mavenPluginToolsVersion.get()
+ val mavenVersion = mavenCliSetup.mavenVersion.orNull
+ val mavenPluginToolsVersion = mavenCliSetup.mavenPluginToolsVersion.orNull
from(pomTemplateFile) {
rename { it.replace(".template.xml", ".xml") }
@@ -52,7 +52,7 @@ val prepareMavenPluginBuildDir by tasks.registering(Sync::class) {
from(generatePom)
- into(setupMavenProperties.mavenBuildDir)
+ into(mavenCliSetup.mavenBuildDir)
}
val helpMojo by tasks.registering(Exec::class) {
@@ -60,11 +60,11 @@ val helpMojo by tasks.registering(Exec::class) {
dependsOn(tasks.installMavenBinary, prepareMavenPluginBuildDir)
- workingDir(setupMavenProperties.mavenBuildDir)
- executable(setupMavenProperties.mvn.get())
+ workingDir(mavenCliSetup.mavenBuildDir)
+ executable(mavenCliSetup.mvn.get())
args("-e", "-B", "org.apache.maven.plugins:maven-plugin-plugin:helpmojo")
- outputs.dir(setupMavenProperties.mavenBuildDir)
+ outputs.dir(mavenCliSetup.mavenBuildDir)
doLast("normalize maven-plugin-help.properties") {
// The maven-plugin-help.properties file contains a timestamp by default.
@@ -89,9 +89,13 @@ val pluginDescriptor by tasks.registering(Exec::class) {
dependsOn(tasks.installMavenBinary, prepareMavenPluginBuildDir)
- workingDir(setupMavenProperties.mavenBuildDir)
- executable(setupMavenProperties.mvn.get())
- args("-e", "-B", "org.apache.maven.plugins:maven-plugin-plugin:descriptor")
+ workingDir(mavenCliSetup.mavenBuildDir)
+ executable(mavenCliSetup.mvn.get())
+ args(
+ "-e",
+ "-B",
+ "org.apache.maven.plugins:maven-plugin-plugin:descriptor"
+ )
outputs.dir(layout.buildDirectory.dir("maven/classes/java/main/META-INF/maven"))
}
@@ -99,7 +103,7 @@ val pluginDescriptor by tasks.registering(Exec::class) {
tasks.jar {
dependsOn(pluginDescriptor, helpMojo)
metaInf {
- from(setupMavenProperties.mavenBuildDir.map { it.dir("classes/java/main/META-INF") })
+ from(mavenCliSetup.mavenBuildDir.map { it.dir("classes/java/main/META-INF") })
}
manifest {
attributes("Class-Path" to configurations.runtimeClasspath.map { configuration ->