Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

- Improve the error message for empty `mainClassName`. ([#1601](https://github.com/GradleUp/shadow/pull/1601))

### Fixed

- Fix the regression of can't shadow directory inputs. ([#1606](https://github.com/GradleUp/shadow/pull/1606))

## [9.0.0](https://github.com/GradleUp/shadow/compare/9.0.0) - 2025-08-07

!!! warning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,53 @@ class JavaPluginsTest : BasePluginTest() {
}
}

@Issue(
"https://github.com/GradleUp/shadow/issues/1606",
)
@Test
fun shadowExposedCustomSourceSetOutput() {
writeClientAndServerModules()
path("client/build.gradle").appendText(
"""
sourceSets {
custom
}
dependencies {
implementation sourceSets.custom.output
}
""".trimIndent(),
)
path("client/src/custom/java/client/Custom1.java").writeText(
"""
package client;
public class Custom1 {}
""".trimIndent(),
)
path("client/src/custom/java/client/Custom2.java").writeText(
"""
package client;
public class Custom2 {}
""".trimIndent(),
)
path("client/src/custom/resources/Foo.bar").writeText("Foo=Bar")

run(serverShadowJarPath)

assertThat(outputServerShadowedJar).useAll {
containsOnly(
"Foo.bar",
"client/",
"server/",
"client/Client.class",
"client/Custom1.class",
"client/Custom2.class",
"server/Server.class",
*junitEntries,
*manifestEntries,
)
}
}

@Issue(
"https://github.com/GradleUp/shadow/issues/449",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,19 +345,24 @@ public abstract class ShadowJar : Jar() {

@TaskAction
override fun copy() {
from(
includedDependencies.files.map { file ->
if (file.extension.equals("aar", ignoreCase = true)) {
includedDependencies.files.forEach { file ->
when {
file.isDirectory -> {
from(file)
}
file.extension.equals("aar", ignoreCase = true) -> {
val message = """
Shadowing AAR file is not supported.
Please exclude dependency artifact: $file
or use Android Fused Library plugin instead. See https://developer.android.com/build/publish-library/fused-library.
""".trimIndent()
error(message)
}
archiveOperations.zipTree(file)
},
)
else -> {
from(archiveOperations.zipTree(file))
}
}
}
injectMultiReleaseAttrIfPresent()
super.copy()
}
Expand Down
Loading