From 932f8f9f246f5344b1222cb40b29be135f906c36 Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Tue, 26 Nov 2024 10:52:58 -0500 Subject: [PATCH] Tweak imports in docs (#1049) --- src/docs/configuration/relocation/README.md | 2 -- src/docs/custom-tasks/README.md | 6 ++---- src/docs/plugins/README.md | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/docs/configuration/relocation/README.md b/src/docs/configuration/relocation/README.md index cb37740d8..f28ca7972 100644 --- a/src/docs/configuration/relocation/README.md +++ b/src/docs/configuration/relocation/README.md @@ -71,8 +71,6 @@ To configure automatic dependency relocation, set `enableRelocation = true` and ```groovy // Configure Auto Relocation -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) { enableRelocation = true relocationPrefix = "myapp" diff --git a/src/docs/custom-tasks/README.md b/src/docs/custom-tasks/README.md index ce43c789c..2fd693a4b 100644 --- a/src/docs/custom-tasks/README.md +++ b/src/docs/custom-tasks/README.md @@ -7,9 +7,7 @@ dependencies to merge into the output. ```groovy // Shadowing Test Sources and Dependencies -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - -task testJar(type: ShadowJar) { +task testJar(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) { archiveClassifier.set("tests") from sourceSets.test.output configurations = [project.configurations.testRuntimeClasspath] @@ -19,4 +17,4 @@ task testJar(type: ShadowJar) { The code snippet above will generate a shadowed JAR containing both the `main` and `test` sources as well as all `testRuntimeOnly` and `testImplementation` dependencies. The file is output to `build/libs/--tests.jar`. - \ No newline at end of file + diff --git a/src/docs/plugins/README.md b/src/docs/plugins/README.md index ab08748f8..81bccc274 100644 --- a/src/docs/plugins/README.md +++ b/src/docs/plugins/README.md @@ -11,8 +11,6 @@ and `relocationPrefix` settings on any `ShadowJar` task. A simple Gradle plugin can use this feature by applying the `shadow` plugin and configuring the `shadowJar` task for relocation. ```groovy no-plugins -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - plugins { id 'com.gradleup.shadow' version '@version@' id 'java'