From ba7d862d11db94e19294d4736dae5a4ed3f7093f Mon Sep 17 00:00:00 2001 From: LikeTheSalad <56847527+LikeTheSalad@users.noreply.github.com> Date: Thu, 14 Sep 2023 15:32:59 +0200 Subject: [PATCH] Fixing "toTransform" method reflection (#1530) --- .../bytebuddy/build/gradle/android/ByteBuddyAndroidPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAndroidPlugin.java b/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAndroidPlugin.java index a064940494..81a3a21469 100644 --- a/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAndroidPlugin.java +++ b/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAndroidPlugin.java @@ -82,13 +82,14 @@ public class ByteBuddyAndroidPlugin implements Plugin { try { Class scope = Class.forName("com.android.build.api.variant.ScopedArtifacts$Scope"); Class scopedArtifacts = Class.forName("com.android.build.api.variant.ScopedArtifacts"); + Class scopedArtifact = Class.forName("com.android.build.api.artifact.ScopedArtifact"); @SuppressWarnings("unchecked") Object project = Enum.valueOf((Class) scope, "PROJECT"); dispatcher = new TransformationDispatcher.ForApk74CompatibleAndroid( Artifacts.class.getMethod("forScope", scope), scopedArtifacts.getMethod("use", TaskProvider.class), Class.forName("com.android.build.api.variant.ScopedArtifactsOperation").getMethod("toTransform", - scopedArtifacts, + scopedArtifact, Function1.class, Function1.class, Function1.class),