Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing one raw type warning from ByteBuddyAndroidPlugin #1702

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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