File tree Expand file tree Collapse file tree
functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers
test/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -338,6 +338,22 @@ class TransformersTest : BaseTransformerTest() {
338338 }
339339 }
340340
341+ @Test
342+ fun mergeProGuardFiles () {
343+ val proGuardEntry = " META-INF/proguard/app.pro"
344+ val content1 = " -keep class com.foo.Bar { *; }"
345+ val content2 = " -keep class com.foo.Baz { *; }"
346+ val one = buildJarOne { insert(proGuardEntry, content1) }
347+ val two = buildJarTwo { insert(proGuardEntry, content2) }
348+ val config = transform<ProGuardTransformer >(dependenciesBlock = implementationFiles(one, two))
349+ projectScript.appendText(config)
350+
351+ runWithSuccess(shadowJarPath)
352+
353+ val content = outputShadowedJar.use { it.getContent(proGuardEntry) }
354+ assertThat(content).isEqualTo(" $content1 \n $content2 " )
355+ }
356+
341357 @ParameterizedTest
342358 @MethodSource(" transformerConfigProvider" )
343359 fun otherTransformers (pair : Pair <String , KClass <* >>) {
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class ProGuardTransformerTest : BaseTransformerTest<ProGuardTransformer>() {
7070
7171 @Test
7272 fun canTransformAlternatePath () {
73- transformer.include(" META-INF/custom" )
73+ transformer.include(" META-INF/custom/** " )
7474 assertThat(transformer.canTransformResource(" META-INF/proguard/rules.pro" )).isTrue()
7575 assertThat(transformer.canTransformResource(" META-INF/custom/rules.pro" )).isTrue()
7676 }
You can’t perform that action at this time.
0 commit comments