From 41ea7376c587f8854d723e50ede91c3cb5fe90c3 Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Thu, 25 May 2023 12:53:19 +0530 Subject: [PATCH] Replace deprecated exclude method with resources.excludes --- .../kotlin/plugin/AllProjectConfigurer.kt | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt b/buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt index 69f8cd400..694dc2caa 100644 --- a/buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt +++ b/buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt @@ -116,16 +116,18 @@ class AllProjectConfigurer { lintConfig = target.rootProject.file("lintConfig.xml") } packagingOptions { - exclude("META-INF/DEPENDENCIES") - exclude("META-INF/LICENSE") - exclude("META-INF/LICENSE.txt") - exclude("META-INF/LICENSE.md") - exclude("META-INF/LICENSE-notice.md") - exclude("META-INF/license.txt") - exclude("META-INF/NOTICE") - exclude("META-INF/NOTICE.txt") - exclude("META-INF/notice.txt") - exclude("META-INF/ASL2.0") + resources.excludes.apply { + add("META-INF/DEPENDENCIES") + add("META-INF/LICENSE") + add("META-INF/LICENSE.txt") + add("META-INF/LICENSE.md") + add("META-INF/LICENSE-notice.md") + add("META-INF/license.txt") + add("META-INF/NOTICE") + add("META-INF/NOTICE.txt") + add("META-INF/notice.txt") + add("META-INF/ASL2.0") + } } sourceSets { getByName("test") {