Skip to content

Commit

Permalink
Tweak imports in docs (#1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored Nov 26, 2024
1 parent 7269e49 commit 932f8f9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/docs/configuration/relocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 2 additions & 4 deletions src/docs/custom-tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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/<project>-<version>-tests.jar`.


2 changes: 0 additions & 2 deletions src/docs/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 932f8f9

Please sign in to comment.