Skip to content

Commit 84d1712

Browse files
authored
Use relative API links in docs (#1354)
It works for both local and remote sites.
1 parent bdd1275 commit 84d1712

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

docs/configuration/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ api: api/com/github/jengelman/gradle/plugins/shadow
44

55
# Configuring Shadow
66

7-
The [`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task type extends from Gradle's
7+
The [`ShadowJar`](../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task type extends from Gradle's
88
[`Jar`](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html) type.
99
This means that all attributes and methods available on `Jar` are also available on
10-
[`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html).
10+
[`ShadowJar`](../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html).
1111
Refer the _Gradle User Guide_ for [Jar](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html) for
1212
details.
1313

docs/configuration/dependencies/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Shadow configures the default `shadowJar` task to merge all dependencies from the project's `runtimeClasspath` configuration
44
into the final JAR.
55
The configurations from which to source dependencies for the merging can be configured using the `configurations` property
6-
of the [`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task type.
6+
of the [`ShadowJar`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task type.
77

88
=== "Kotlin"
99

@@ -25,9 +25,9 @@ The above code sample would configure the `shadowJar` task to merge dependencies
2525
This means any dependency declared in the `runtimeOnly` configuration would be **not** be included in the final JAR.
2626

2727
> Note the literal use of `project.configurations` when setting the `configurations` attribute of a
28-
[`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task.
28+
[`ShadowJar`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task.
2929
This is **required**. It may be tempting to specify `configurations = [configurations.compile]` but this will not
30-
have the intended effect, as `configurations.compile` will try to delegate to the `configurations` property of the [`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task instead of the `project`
30+
have the intended effect, as `configurations.compile` will try to delegate to the `configurations` property of the [`ShadowJar`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task instead of the `project`
3131

3232
## Embedding Jar Files Inside Your Shadow Jar
3333

@@ -72,7 +72,7 @@ See also [Adding Extra Files](../README.md#adding-extra-files)
7272
## Filtering Dependencies
7373

7474
Individual dependencies can be filtered from the final JAR by using the `dependencies` block of a
75-
[`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task.
75+
[`ShadowJar`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task.
7676
Dependency filtering does **not** apply to transitive dependencies.
7777
That is, excluding a dependency does not exclude any of its dependencies from the final JAR.
7878

@@ -306,7 +306,7 @@ You can also use type-safe project accessors or version catalog accessors to fil
306306
### Programmatically Selecting Dependencies to Filter
307307

308308
If more complex decisions are needed to select the dependencies to be included, the
309-
[`dependencies`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/dependencies.html)
309+
[`dependencies`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/dependencies.html)
310310
block provides a method that accepts a `Closure` for selecting dependencies.
311311

312312
=== "Kotlin"

docs/configuration/merging/README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Controlling JAR Content Merging
22

33
Shadow allows for customizing the process by which the output JAR is generated through the
4-
[`ResourceTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-resource-transformer/index.html) interface.
4+
[`ResourceTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-resource-transformer/index.html) interface.
55
This is a concept that has been carried over from the original Maven Shade implementation.
6-
A [`ResourceTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-resource-transformer/index.html) is invoked for each
6+
A [`ResourceTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-resource-transformer/index.html) is invoked for each
77
entry in the JAR before being written to the final output JAR.
8-
This allows a [`ResourceTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-resource-transformer/index.html) to
8+
This allows a [`ResourceTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-resource-transformer/index.html) to
99
determine if it should process a particular entry and apply any modifications before writing the stream to the output.
1010

1111
=== "Kotlin"
@@ -147,7 +147,7 @@ At runtime, this file is read and used to configure library or application behav
147147

148148
Multiple dependencies may use the same service descriptor file name.
149149
In this case, it is generally desired to merge the content of each instance of the file into a single output file.
150-
The [`ServiceFileTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-service-file-transformer/index.html)
150+
The [`ServiceFileTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-service-file-transformer/index.html)
151151
class is used to perform this merging. By default, it will merge each copy of a file under `META-INF/services` into a
152152
single file in the output JAR.
153153

@@ -168,17 +168,17 @@ single file in the output JAR.
168168
```
169169

170170
The above code snippet is a convenience syntax for calling
171-
[`transform(ServiceFileTransformer.class)`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/transform.html).
171+
[`transform(ServiceFileTransformer.class)`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/transform.html).
172172

173173
> Groovy Extension Module descriptor files (located at `META-INF/services/org.codehaus.groovy.runtime.ExtensionModule`)
174-
are ignored by the [`ServiceFileTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-service-file-transformer/index.html).
174+
are ignored by the [`ServiceFileTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-service-file-transformer/index.html).
175175
This is due to these files having a different syntax than standard service descriptor files.
176-
Use the [`mergeGroovyExtensionModules()`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/merge-groovy-extension-modules.html) method to merge
176+
Use the [`mergeGroovyExtensionModules()`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/merge-groovy-extension-modules.html) method to merge
177177
these files if your dependencies contain them.
178178

179179
### Configuring the Location of Service Descriptor Files
180180

181-
By default, the [`ServiceFileTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-service-file-transformer/index.html)
181+
By default, the [`ServiceFileTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-service-file-transformer/index.html)
182182
is configured to merge files in `META-INF/services`.
183183
This directory can be overridden to merge descriptor files in a different location.
184184

@@ -204,7 +204,7 @@ This directory can be overridden to merge descriptor files in a different locati
204204

205205
#### Excluding/Including Specific Service Descriptor Files From Merging
206206

207-
The [`ServiceFileTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-service-file-transformer/index.html)
207+
The [`ServiceFileTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-service-file-transformer/index.html)
208208
class supports specifying specific files to include or exclude from merging.
209209

210210
=== "Kotlin"
@@ -231,9 +231,9 @@ class supports specifying specific files to include or exclude from merging.
231231

232232
Shadow provides a specific transformer for dealing with Groovy extension module files.
233233
This is due to their special syntax and how they need to be merged together.
234-
The [`GroovyExtensionModuleTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-groovy-extension-module-transformer/index.html)
234+
The [`GroovyExtensionModuleTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-groovy-extension-module-transformer/index.html)
235235
will handle these files.
236-
The [`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task also provides a short syntax
236+
The [`ShadowJar`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task also provides a short syntax
237237
method to add this transformer.
238238

239239
=== "Kotlin"
@@ -276,11 +276,11 @@ containing Log4j 2.x Core components. It's a Gradle equivalent of [Log4j Plugin
276276
## Appending Text Files
277277

278278
Generic text files can be appended together using the
279-
[`AppendingTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-appending-transformer/index.html).
279+
[`AppendingTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-appending-transformer/index.html).
280280
Each file is appended using separators (defaults to `\n`) to separate content.
281-
The [`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task provides a short syntax
281+
The [`ShadowJar`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html) task provides a short syntax
282282
method of
283-
[`append(String)`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/append.html) to
283+
[`append(String)`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/append.html) to
284284
configure this transformer.
285285

286286
=== "Kotlin"
@@ -331,10 +331,10 @@ configure this transformer.
331331
## Appending XML Files
332332

333333
XML files require a special transformer for merging.
334-
The [`XmlAppendingTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-xml-appending-transformer/index.html)
334+
The [`XmlAppendingTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-xml-appending-transformer/index.html)
335335
reads each XML document and merges each root element into a single document.
336-
There is no short syntax method for the [`XmlAppendingTransformer`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-xml-appending-transformer/index.html).
337-
It must be added using the [`transform`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/transform.html)) methods.
336+
There is no short syntax method for the [`XmlAppendingTransformer`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.transformers/-xml-appending-transformer/index.html).
337+
It must be added using the [`transform`](../../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/transform.html)) methods.
338338

339339
=== "Kotlin"
340340

docs/custom-tasks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Creating a Custom ShadowJar Task
22

33
The built in `shadowJar` task only provides an output for the `main` source set of the project.
4-
It is possible to add arbitrary [`ShadowJar`](https://gradleup.com/shadow/api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html)
4+
It is possible to add arbitrary [`ShadowJar`](../api/shadow/com.github.jengelman.gradle.plugins.shadow.tasks/-shadow-jar/index.html)
55
tasks to a project. When doing so, ensure that the `configurations` property is specified to inform Shadow which
66
dependencies to merge into the output.
77

0 commit comments

Comments
 (0)