From ddb10074df849f223c150081983fc780a3ea7b34 Mon Sep 17 00:00:00 2001 From: Cesar Munoz <56847527+LikeTheSalad@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:43:49 +0100 Subject: [PATCH] Fixing missing symbols issue --- .../gradle/plugin/animalsniffer/AnimalSnifferPlugin.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/groovy/ru/vyarus/gradle/plugin/animalsniffer/AnimalSnifferPlugin.groovy b/src/main/groovy/ru/vyarus/gradle/plugin/animalsniffer/AnimalSnifferPlugin.groovy index 27c17a8..b1f6b45 100644 --- a/src/main/groovy/ru/vyarus/gradle/plugin/animalsniffer/AnimalSnifferPlugin.groovy +++ b/src/main/groovy/ru/vyarus/gradle/plugin/animalsniffer/AnimalSnifferPlugin.groovy @@ -196,8 +196,10 @@ class AnimalSnifferPlugin implements Plugin { @CompileStatic(TypeCheckingMode.SKIP) private TaskProvider createAndroidClassesCollector(String taskName, Object variant) { TaskProvider collectClasses = project.tasks.register(taskName, AndroidClassesCollector) - variant.artifacts.forScope(com.android.build.api.variant.ScopedArtifacts.Scope.PROJECT).use(collectClasses) - .toGet(com.android.build.api.artifact.ScopedArtifact.CLASSES.INSTANCE, new Function1>() { + def scopedArtifactsScopeType = Class.forName("com.android.build.api.variant.ScopedArtifacts\$Scope") + def scopedArtifactTypeClasses = Class.forName("com.android.build.api.artifact.ScopedArtifact\$CLASSES") + variant.artifacts.forScope(scopedArtifactsScopeType.PROJECT).use(collectClasses) + .toGet(scopedArtifactTypeClasses.INSTANCE, new Function1>() { @Override ListProperty invoke(AndroidClassesCollector task) { return task.jarFiles