Skip to content

Commit

Permalink
Remove use of raw type.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Aug 22, 2024
1 parent d94182e commit 16a83a4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public class ByteBuddyAndroidPlugin implements Plugin<Project> {
Class<?> scopedArtifact = Class.forName("com.android.build.api.artifact.ScopedArtifact");
@SuppressWarnings("unchecked")
Object project = Enum.valueOf((Class) scope, "ALL");
@SuppressWarnings("unchecked")
Artifact<FileSystemLocation> location = (Artifact<FileSystemLocation>) Class.forName("com.android.build.api.artifact.ScopedArtifact$CLASSES").getField("INSTANCE").get(null);
dispatcher = new TransformationDispatcher.ForApk74CompatibleAndroid(
Artifacts.class.getMethod("forScope", scope),
scopedArtifacts.getMethod("use", TaskProvider.class),
Expand All @@ -101,7 +103,7 @@ public class ByteBuddyAndroidPlugin implements Plugin<Project> {
Function1.class,
Function1.class),
project,
(Artifact<FileSystemLocation>) Class.forName("com.android.build.api.artifact.ScopedArtifact$CLASSES").getField("INSTANCE").get(null));
location);
} catch (Throwable ignored) {
dispatcher = TransformationDispatcher.ForLegacyAndroid.INSTANCE;
}
Expand Down

0 comments on commit 16a83a4

Please sign in to comment.