Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Aug 1, 2024
2 parents a83d10c + a933e8e commit abe73c5
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 111 deletions.
84 changes: 0 additions & 84 deletions .circleci/config.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
# Always test on the latest version and all LTS.
java: [ 11, 17, 21, 22 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
validate-wrappers: true
- run: ./gradlew build
20 changes: 0 additions & 20 deletions .github/workflows/gradle-wrapper-validation.yml

This file was deleted.

8 changes: 4 additions & 4 deletions src/docs/configuration/dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Shadow configures the default `shadowJar` task to merge all dependencies from the project's `runtimeClasspath` configuration
into the final JAR.
The configurations to from which to source dependencies for the merging can be configured using the `configurations` property
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.

```groovy
Expand Down Expand Up @@ -127,7 +127,7 @@ dependencies {
shadowJar {
dependencies {
exclude(dependency('org.apache.logging.log4j::2.11.1'))
exclude(dependency('org.apache.logging.log4j:2.11.1'))
}
}
```
Expand All @@ -146,9 +146,9 @@ dependencies {
shadowJar {
dependencies {
exclude(dependency {
exclude {
it.moduleGroup == 'org.apache.logging.log4j'
})
}
}
}
```
7 changes: 4 additions & 3 deletions src/docs/configuration/relocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ Shadow is shipped with a task that can be used to automatically configure all pa
This feature was formally shipped into a 2nd plugin (`com.github.johnrengelman.plugin-shadow`) but has been
removed for clarity reasons in version 4.0.0.

To configure automatic dependency relocation, declare a task of type `ConfigureShadowRelocation` and configure the
`target` parameter to be the `ShadowJar` task you wish to auto configure. You will also need to declare a task
dependency so the tasks execute in the correct order.
To configure automatic dependency relocation, set `enableRelocation true` and optionally specify a custom
`relocationPrefix` to override the default value of `"shadow"`.

```groovy
// Configure Auto Relocation
Expand All @@ -80,6 +79,8 @@ tasks.named('shadowJar', ShadowJar) {
}
```

In versions before 8.1.0 it was necessary to configure a separate `ConfigureShadowRelocation` task for this.

> Configuring package auto relocation can add significant time to the shadow process as it will process all dependencies
in the configurations declared to be shadowed. By default, this is the `runtime` or `runtimeClasspath` configurations.
Be mindful that some Gradle plugins will automatically add dependencies to your class path. You may need to remove these
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package com.github.jengelman.gradle.plugins.shadow

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.util.PluginSpecification
import org.gradle.api.JavaVersion
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.plugins.JavaPlugin
import org.gradle.testfixtures.ProjectBuilder
import org.gradle.testkit.runner.BuildResult
import spock.lang.Ignore
import spock.lang.IgnoreIf
import spock.lang.Issue
import spock.lang.Unroll

Expand Down Expand Up @@ -52,6 +54,10 @@ class ShadowPluginSpec extends PluginSpecification {

}

@IgnoreIf({
// Gradle 8.3 doesn't support Java 21.
JavaVersion.current().majorVersion.toInteger() >= 21
})
@Unroll
def 'Compatible with Gradle #version'() {
given:
Expand Down

0 comments on commit abe73c5

Please sign in to comment.