Skip to content

Document how to make a shadowed JAR the default output of a project#1941

Open
Goooler wants to merge 1 commit intomainfrom
g/20260301/doc-shadow-jar-default
Open

Document how to make a shadowed JAR the default output of a project#1941
Goooler wants to merge 1 commit intomainfrom
g/20260301/doc-shadow-jar-default

Conversation

@Goooler
Copy link
Member

@Goooler Goooler commented Mar 1, 2026

Closes #1893.

@Goooler Goooler force-pushed the g/20260301/doc-shadow-jar-default branch from 21ce316 to 19e0f3d Compare March 1, 2026 12:07
@Goooler Goooler marked this pull request as ready for review March 1, 2026 12:31
@Goooler Goooler requested a review from Copilot March 1, 2026 12:31

This comment was marked as outdated.

@Goooler

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as resolved.

commit 7970269
Author: Goooler <wangzongler@gmail.com>
Date:   Mon Mar 2 10:37:45 2026 +0800

    Reformat

commit dcdcbc2
Merge: c1dddbb 09f5081
Author: Goooler <wangzongler@gmail.com>
Date:   Mon Mar 2 10:34:52 2026 +0800

    Merge remote-tracking branch 'origin/main' into g/20260301/doc-shadow-jar-default

commit c1dddbb
Author: Zongle Wang <wangzongler@gmail.com>
Date:   Sun Mar 1 21:00:58 2026 +0800

    Update src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/JavaPluginsTest.kt

    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

commit 2fe8042
Author: Zongle Wang <wangzongler@gmail.com>
Date:   Sun Mar 1 20:51:38 2026 +0800

    Update src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/JavaPluginsTest.kt

commit 7cec848
Author: Zongle Wang <wangzongler@gmail.com>
Date:   Sun Mar 1 20:37:13 2026 +0800

    Apply suggestions from code review

    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

commit a4dc367
Author: Goooler <wangzongler@gmail.com>
Date:   Sun Mar 1 20:30:35 2026 +0800

    Fix test

commit 27a89d1
Author: Goooler <wangzongler@gmail.com>
Date:   Sun Mar 1 20:23:01 2026 +0800

    Tweak `important` block

commit 0683e67
Author: Goooler <wangzongler@gmail.com>
Date:   Sun Mar 1 20:14:43 2026 +0800

    Merge tests

commit 4d76626
Merge: 11ed4d9 7a91558
Author: Goooler <wangzongler@gmail.com>
Date:   Sun Mar 1 20:12:01 2026 +0800

    Merge remote-tracking branch 'origin/copilot/address-issue-1893' into g/20260301/doc-shadow-jar-default

    # Conflicts:
    #	docs/multi-project/README.md

commit 11ed4d9
Author: Goooler <wangzongler@gmail.com>
Date:   Sun Mar 1 20:11:40 2026 +0800

    Polish doc

commit 19e0f3d
Author: Goooler <wangzongler@gmail.com>
Date:   Sun Mar 1 19:39:35 2026 +0800

    Add tests

commit 7053f5d
Author: Goooler <wangzongler@gmail.com>
Date:   Sun Mar 1 19:35:14 2026 +0800

    Update doc

commit 7a91558
Author: Goooler <wangzongler@gmail.com>
Date:   Fri Feb 27 20:54:26 2026 +0800

    Fix formats

commit 37538f0
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Fri Feb 27 12:45:48 2026 +0000

    test: add integration tests for shadow JAR as default project artifact (#1893)

    Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>

commit 6331f98
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Fri Feb 27 12:30:19 2026 +0000

    docs: add section on making shadowed jar the default output in multi-project builds (#1893)

    Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>

commit 12cfe62
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Fri Feb 27 12:28:29 2026 +0000

    Initial plan
@Goooler Goooler force-pushed the g/20260301/doc-shadow-jar-default branch from 7970269 to 35d39c8 Compare March 2, 2026 02:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +195 to +199
@Issue("https://github.com/GradleUp/shadow/issues/1893")
@Test
fun consumeShadowedProjectViaApiElementsAndRuntimeElements() {
settingsScript.appendText(
"""
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consumeShadowedProjectViaApiElementsAndRuntimeElements() only runs :server:jar, which exercises compile-time variant selection (apiElements) but does not validate runtime consumption (runtimeElements). Either add a small assertion that server’s runtimeClasspath resolves client-1.0-all.jar, or rename the test to avoid implying runtime coverage.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion to make a shadowed jar the default output of a project

3 participants