Skip to content

Commit c566f27

Browse files
committed
Merge remote-tracking branch 'origin/main' into g/20250311/kotlin-new-app-block
2 parents 11bf490 + b525696 commit c566f27

File tree

17 files changed

+56
-43
lines changed

17 files changed

+56
-43
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ Gradle plugin for creating fat/uber JARs with support for package relocation.
2929
| 5.2.0 - 6.1.0 | 5.x - 6.x | 7 |
3030
| 6.1.0+ | 6.x | 8 |
3131
| 7.0.0+ | 7.x | 8 |
32-
| 8.0.0+ | 8.0+ | 8 |
33-
| 8.3.0+ | 8.3+ | 8 |
34-
| 9.0.0+ | 8.3+ | 11 |
32+
| 8.0.0+ | 8.0 | 8 |
33+
| 8.3.0+ | 8.3 | 8 |
34+
| 9.0.0+ | 8.3 | 11 |

api/shadow.api

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ public abstract class com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugi
44
public static final field Companion Lcom/github/jengelman/gradle/plugins/shadow/ShadowBasePlugin$Companion;
55
public static final field DISTRIBUTION_NAME Ljava/lang/String;
66
public static final field EXTENSION_NAME Ljava/lang/String;
7-
public static final field GROUP_NAME Ljava/lang/String;
87
public static final field SHADOW Ljava/lang/String;
98
public fun <init> ()V
109
public synthetic fun apply (Ljava/lang/Object;)V

build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ tasks.pluginUnderTestMetadata {
147147
)
148148
}
149149

150+
tasks.validatePlugins {
151+
// TODO: https://github.com/gradle/gradle/issues/22600
152+
enableStricterValidation = true
153+
}
154+
150155
tasks.check {
151156
dependsOn(tasks.withType<Test>())
152157
}

docs/changes/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
## [Unreleased]
55

6+
**Changed**
7+
8+
- Move the group of `ShadowJar` from `shadow` to `build`. ([#1355](https://github.com/GradleUp/shadow/pull/1355))
9+
10+
11+
## [v9.0.0-beta11] (2025-03-18)
12+
613
**Added**
714

815
- Add Kotlin DSL examples in docs. ([#1306](https://github.com/GradleUp/shadow/pull/1306))
@@ -609,7 +616,8 @@ Instead, use the `enableRelocation = true` and `relocationPrefix = "<new package
609616

610617

611618

612-
[Unreleased]: https://github.com/GradleUp/shadow/compare/9.0.0-beta10...HEAD
619+
[Unreleased]: https://github.com/GradleUp/shadow/compare/9.0.0-beta11...HEAD
620+
[v9.0.0-beta11]: https://github.com/GradleUp/shadow/releases/tag/9.0.0-beta11
613621
[v9.0.0-beta10]: https://github.com/GradleUp/shadow/releases/tag/9.0.0-beta10
614622
[v9.0.0-beta9]: https://github.com/GradleUp/shadow/releases/tag/9.0.0-beta9
615623
[v9.0.0-beta8]: https://github.com/GradleUp/shadow/releases/tag/9.0.0-beta8

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: 18 additions & 18 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

@@ -202,9 +202,9 @@ This directory can be overridden to merge descriptor files in a different locati
202202
}
203203
```
204204

205-
#### Excluding/Including Specific Service Descriptor Files From Merging
205+
### 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
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

88
=== "Kotlin"
99

1010
```kotlin
1111
val testShadowJar by tasks.registering(com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar::class) {
12-
group = com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin.GROUP_NAME
12+
group = LifecycleBasePlugin.BUILD_GROUP
1313
description = "Create a combined JAR of project and test dependencies"
1414

1515
archiveClassifier = "tests"
@@ -33,7 +33,7 @@ dependencies to merge into the output.
3333

3434
```groovy
3535
def testShadowJar = tasks.register('testShadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
36-
group = com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin.GROUP_NAME
36+
group = LifecycleBasePlugin.BUILD_GROUP
3737
description = 'Create a combined JAR of project and test dependencies'
3838

3939
archiveClassifier = 'tests'

docs/publishing/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ It is possible to publish a custom `ShadowJar` task's output via the [`MavenPubl
163163
}
164164

165165
val testShadowJar by tasks.registering(com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar::class) {
166-
group = com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin.GROUP_NAME
166+
group = LifecycleBasePlugin.BUILD_GROUP
167167
description = "Create a combined JAR of project and test dependencies"
168168
archiveClassifier = "tests"
169169
from(sourceSets.test.map { it.output })
@@ -196,7 +196,7 @@ It is possible to publish a custom `ShadowJar` task's output via the [`MavenPubl
196196
}
197197

198198
def testShadowJar = tasks.register('testShadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
199-
group = com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin.GROUP_NAME
199+
group = LifecycleBasePlugin.BUILD_GROUP
200200
description = 'Create a combined JAR of project and test dependencies'
201201
archiveClassifier = 'tests'
202202
from sourceSets.named('test').map { it.output }

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
kotlin = "2.1.20-RC3"
2+
kotlin = "2.1.20"
33
moshi = "1.15.2"
44

55
[libraries]

0 commit comments

Comments
 (0)