Skip to content

Commit

Permalink
Fixing "toTransform" method reflection (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
LikeTheSalad authored Sep 14, 2023
1 parent 140e3d0 commit ba7d862
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ public class ByteBuddyAndroidPlugin implements Plugin<Project> {
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),
Expand Down

0 comments on commit ba7d862

Please sign in to comment.