Skip to content

Commit d94182e

Browse files
raphwLikeTheSalad
andauthored
Removing one raw type warning from ByteBuddyAndroidPlugin (#1702)
Co-authored-by: Cesar Munoz <[email protected]>
1 parent 98bb6cd commit d94182e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAndroidPlugin.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import org.gradle.api.file.Directory;
5050
import org.gradle.api.file.DirectoryProperty;
5151
import org.gradle.api.file.FileCollection;
52+
import org.gradle.api.file.FileSystemLocation;
5253
import org.gradle.api.file.RegularFile;
5354
import org.gradle.api.file.RegularFileProperty;
5455
import org.gradle.api.provider.ListProperty;
@@ -100,7 +101,7 @@ public class ByteBuddyAndroidPlugin implements Plugin<Project> {
100101
Function1.class,
101102
Function1.class),
102103
project,
103-
(Artifact) Class.forName("com.android.build.api.artifact.ScopedArtifact$CLASSES").getField("INSTANCE").get(null));
104+
(Artifact<FileSystemLocation>) Class.forName("com.android.build.api.artifact.ScopedArtifact$CLASSES").getField("INSTANCE").get(null));
104105
} catch (Throwable ignored) {
105106
dispatcher = TransformationDispatcher.ForLegacyAndroid.INSTANCE;
106107
}
@@ -557,7 +558,7 @@ class ForApk74CompatibleAndroid implements TransformationDispatcher {
557558
/**
558559
* The {@code com.android.build.api.artifact.ScopedArtifact$CLASSES#INSTANCE} value.
559560
*/
560-
private final Artifact artifact;
561+
private final Artifact<FileSystemLocation> artifact;
561562

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

0 commit comments

Comments
 (0)