Skip to content

Commit

Permalink
Update links in docs (#928)
Browse files Browse the repository at this point in the history
Co-authored-by: Zongle Wang <[email protected]>
  • Loading branch information
oleg-nenashev and Goooler authored Sep 13, 2024
1 parent 3e9b1cd commit fb6fd06
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Please check the [User Guide](http://imperceptiblethoughts.com/shadow) before submitting "how do I do 'x'?" questions!
Please check the [User Guide](https://gradleup.com/shadow) before submitting "how do I do 'x'?" questions!

### Shadow Version

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Gradle plugin for creating fat/uber JARs with support for package relocation.

## Documentation

Read the [User Guide](https://imperceptiblethoughts.com/shadow/)!
Read the [User Guide](https://gradleup.com/shadow/)!

## Current Status

Expand Down
2 changes: 1 addition & 1 deletion src/docs/.vuepress/components/ApiLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export default {
data () {
return {
absolutePath: "http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/" + this.path
absolutePath: "https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/" + this.path
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ actionLink: /introduction/

John Engelman - @johnrengelman

[API Docs](http://imperceptiblethoughts.com/shadow/api/index.html)
[API Docs](https://gradleup.com/shadow/api/index.html)
2 changes: 1 addition & 1 deletion src/docs/changes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Instead, use the `enableRelocation = true` and `relocationPrefix = "<new package
## v4.0.0 (2018-09-25)

- **Breaking Change!** Restrict Plugin to Gradle 4.0+. Shadow major versions will align with Gradle major versions going forward.
- **Breaking Change!** For clarity purposes `com.github.johnrengelman.plugin-shadow` has been removed. If you intend to use this feature, you will need to declare your own `ConfigureShadowRelocation` task. See section [2.9.2](http://imperceptiblethoughts.com/shadow/#automatically_relocating_dependencies) of the User Guide
- **Breaking Change!** For clarity purposes `com.github.johnrengelman.plugin-shadow` has been removed. If you intend to use this feature, you will need to declare your own `ConfigureShadowRelocation` task. See section [2.9.2](https://gradleup.com/shadow/#automatically_relocating_dependencies) of the User Guide
- [Sergey Tselovalnikov](https://github.com/SerCeMan) - Upgrade to ASM 6.2.1 to support Java 11
- [Chris Cowan](https://github.com/Macil) - Add support for `shadowJar.preserveFileTimestamps` property. See [Jar.preserveFileTimestamps](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:preserveFileTimestamps)
- [Paul N. Baker](https://github.com/paul-nelson-baker) - Add `Log4j2PluginsCacheFileTransformer` to process Log4j DAT files during merge.
Expand Down
4 changes: 2 additions & 2 deletions src/docs/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ api: api/com/github/jengelman/gradle/plugins/shadow

# Configuring Shadow

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

Expand Down
10 changes: 5 additions & 5 deletions src/docs/configuration/dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Shadow configures the default `shadowJar` task to merge all dependencies from the project's `runtimeClasspath` configuration
into the final JAR.
The configurations from which to source dependencies for the merging can be configured using the `configurations` property
of the [`ShadowJar`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html) task type.
of the [`ShadowJar`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html) task type.

```groovy
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
Expand All @@ -15,10 +15,10 @@ The above code sample would configure the `shadowJar` task to merge dependencies
This means any dependency declared in the `runtimeOnly` configuration would be **not** be included in the final JAR.

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

## Embedding Jar Files Inside Your Shadow Jar

Expand All @@ -31,7 +31,7 @@ begins.
## Filtering Dependencies

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

Expand Down Expand Up @@ -135,7 +135,7 @@ tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.Shadow
### Programmatically Selecting Dependencies to Filter

If more complex decisions are needed to select the dependencies to be included, the
[`dependencies`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html#dependencies(Action<DependencyFilter>))
[`dependencies`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html#dependencies(Action<DependencyFilter>))
block provides a method that accepts a `Closure` for selecting dependencies.

```groovy
Expand Down
34 changes: 17 additions & 17 deletions src/docs/configuration/merging/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Controlling JAR Content Merging

Shadow allows for customizing the process by which the output JAR is generated through the
[`Transformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/Transformer.html) interface.
[`Transformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/Transformer.html) interface.
This is a concept that has been carried over from the original Maven Shade implementation.
A [`Transformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/Transformer.html) is invoked for each
A [`Transformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/Transformer.html) is invoked for each
entry in the JAR before being written to the final output JAR.
This allows a [`Transformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/Transformer.html) to
This allows a [`Transformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/Transformer.html) to
determine if it should process a particular entry and apply any modifications before writing the stream to the output.

```groovy
Expand Down Expand Up @@ -94,7 +94,7 @@ At runtime, this file is read and used to configure library or application behav

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

Expand All @@ -106,17 +106,17 @@ tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.Shadow
```

The above code snippet is a convenience syntax for calling
[`transform(ServiceFileTransformer.class)`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html#transform(Class<?%20extends%20Transformer>)).
[`transform(ServiceFileTransformer.class)`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html#transform(Class<?%20extends%20Transformer>)).

> Groovy Extension Module descriptor files (located at `META-INF/services/org.codehaus.groovy.runtime.ExtensionModule`)
are ignored by the [`ServiceFileTransformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/ServiceFileTransformer.html).
are ignored by the [`ServiceFileTransformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/ServiceFileTransformer.html).
This is due to these files having a different syntax than standard service descriptor files.
Use the [`mergeGroovyExtensionModules()`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html#mergeGroovyExtensionModules()) method to merge
Use the [`mergeGroovyExtensionModules()`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html#mergeGroovyExtensionModules()) method to merge
these files if your dependencies contain them.

### Configuring the Location of Service Descriptor Files

By default the [`ServiceFileTransformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/ServiceFileTransformer.html)
By default the [`ServiceFileTransformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/ServiceFileTransformer.html)
is configured to merge files in `META-INF/services`.
This directory can be overridden to merge descriptor files in a different location.

Expand All @@ -131,7 +131,7 @@ tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.Shadow

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

The [`ServiceFileTransformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/ServiceFileTransformer.html)
The [`ServiceFileTransformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/ServiceFileTransformer.html)
class supports specifying specific files to include or exclude from merging.

```groovy
Expand All @@ -147,9 +147,9 @@ tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.Shadow

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

```groovy
Expand All @@ -162,11 +162,11 @@ tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.Shadow
## Appending Text Files

Generic text files can be appended together using the
[`AppendingTransformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/AppendingTransformer.html).
[`AppendingTransformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/AppendingTransformer.html).
Each file is appended using new lines to separate content.
The [`ShadowJar`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html) task provides a short syntax
The [`ShadowJar`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html) task provides a short syntax
method of
[`append(String)`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html#append(java.lang.String)) to
[`append(String)`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.html#append(java.lang.String)) to
configure this transformer.

```groovy
Expand All @@ -179,10 +179,10 @@ tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.Shadow
## Appending XML Files

XML files require a special transformer for merging.
The [`XmlAppendingTransformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.html)
The [`XmlAppendingTransformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.html)
reads each XML document and merges each root element into a single document.
There is no short syntax method for the [`XmlAppendingTransformer`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.html).
It must be added using the [`transform`](http://imperceptiblethoughts.com/shadow/api/com/github/jengelman/gradle/plugins/shadow//tasks/ShadowJar.html#transform(Class<?%20Fextends%20Transformer>)) methods.
There is no short syntax method for the [`XmlAppendingTransformer`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.html).
It must be added using the [`transform`](https://gradleup.com/shadow/api/com/github/jengelman/gradle/plugins/shadow//tasks/ShadowJar.html#transform(Class<?%20Fextends%20Transformer>)) methods.

```groovy
// Appending a XML File
Expand Down
2 changes: 1 addition & 1 deletion src/docs/custom-tasks/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Creating a Custom ShadowJar Task

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

Expand Down

0 comments on commit fb6fd06

Please sign in to comment.