Skip to content

Commit

Permalink
Removing one raw type warning from ByteBuddyAndroidPlugin (#1702)
Browse files Browse the repository at this point in the history
Co-authored-by: Cesar Munoz <likethesalad@gmail.com>
  • Loading branch information
raphw and LikeTheSalad committed Aug 22, 2024
1 parent 98bb6cd commit d94182e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.gradle.api.file.Directory;
import org.gradle.api.file.DirectoryProperty;
import org.gradle.api.file.FileCollection;
import org.gradle.api.file.FileSystemLocation;
import org.gradle.api.file.RegularFile;
import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.provider.ListProperty;
Expand Down Expand Up @@ -100,7 +101,7 @@ public class ByteBuddyAndroidPlugin implements Plugin<Project> {
Function1.class,
Function1.class),
project,
(Artifact) Class.forName("com.android.build.api.artifact.ScopedArtifact$CLASSES").getField("INSTANCE").get(null));
(Artifact<FileSystemLocation>) Class.forName("com.android.build.api.artifact.ScopedArtifact$CLASSES").getField("INSTANCE").get(null));
} catch (Throwable ignored) {
dispatcher = TransformationDispatcher.ForLegacyAndroid.INSTANCE;
}
Expand Down Expand Up @@ -557,7 +558,7 @@ class ForApk74CompatibleAndroid implements TransformationDispatcher {
/**
* The {@code com.android.build.api.artifact.ScopedArtifact$CLASSES#INSTANCE} value.
*/
private final Artifact artifact;
private final Artifact<FileSystemLocation> artifact;

/**
* Creates a new dispatcher.
Expand All @@ -568,7 +569,7 @@ class ForApk74CompatibleAndroid implements TransformationDispatcher {
* @param scope The {@code com.android.build.api.variant.ScopedArtifacts$Scope#PROJECT} value.
* @param artifact The {@code com.android.build.api.artifact.ScopedArtifact$CLASSES#INSTANCE} value.
*/
protected ForApk74CompatibleAndroid(Method forScope, Method use, Method toTransform, Object scope, Artifact artifact) {
protected ForApk74CompatibleAndroid(Method forScope, Method use, Method toTransform, Object scope, Artifact<FileSystemLocation> artifact) {
this.forScope = forScope;
this.use = use;
this.toTransform = toTransform;
Expand Down

0 comments on commit d94182e

Please sign in to comment.