Skip to content

Commit

Permalink
Add a test for using archiveFileName (GradleUp#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored Jan 12, 2025
1 parent a671b71 commit bd25e8d
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,30 @@ class ShadowPluginTest : BasePluginTest() {
}
}

@Test
fun worksWithArchiveFileName() {
writeMainClass()
projectScriptPath.appendText(
"""
dependencies {
implementation 'junit:junit:3.8.2'
}
$shadowJar {
archiveFileName = 'my-shadow.tar'
}
""".trimIndent(),
)

run(shadowJarTask)

assertThat(jarPath("build/libs/my-shadow.tar")).useAll {
containsEntries(
"shadow/Main.class",
"junit/framework/Test.class",
)
}
}

private fun writeShadowedClientAndServerModules() {
writeClientAndServerModules()
path("client/build.gradle").appendText(
Expand Down

0 comments on commit bd25e8d

Please sign in to comment.