Skip to content

Commit 2f6f1f5

Browse files
CopilotGoooler
andauthored
Deprecate KnowsTask (#1957)
* Initial plan * Deprecate KnowsTask with @deprecated annotation and warning log Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com> * Update src/docs/changes/README.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com> Co-authored-by: Zongle Wang <wangzongler@gmail.com>
1 parent 9f1d458 commit 2f6f1f5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/docs/changes/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
## [Unreleased]
55

6+
**Deprecated**
7+
8+
- Deprecate `KnowsTask`, it will be removed in the next major release. ([#1957](https://github.com/GradleUp/shadow/pull/1957))
9+
610
**Fixed**
711

812
- Fix compatibility with Isolated Projects. ([#1947](https://github.com/GradleUp/shadow/pull/1947))

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/KnowsTask.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ import org.codehaus.groovy.reflection.ReflectionUtils
44
import org.gradle.api.DefaultTask
55
import org.gradle.api.tasks.TaskAction
66

7+
/**
8+
* @deprecated This task will be removed in the next major release.
9+
*/
10+
@Deprecated
711
class KnowsTask extends DefaultTask {
812

913
public static final String NAME = "knows"
1014
public static final String DESC = "Do you know who knows?"
1115

1216
@TaskAction
1317
def knows() {
18+
logger.warn("The '{}' task has been deprecated and will be removed in the next major release.", NAME)
1419
println "\nNo, The Shadow Knows...."
1520
println ReflectionUtils.getCallingClass(0).getResourceAsStream("/shadowBanner.txt").text
1621
}

0 commit comments

Comments
 (0)