raphw / byte-buddy

Runtime code generation for the Java virtual machine.
https://bytebuddy.net
Apache License 2.0
6.22k stars 802 forks source link

Depreation warning when using ByteBuddy Gradle plugin #1707

Open vyazelenko opened 6 days ago

vyazelenko commented 6 days ago

ByteBuddy version: 1.15.1 Gradle version: 8.10.1

Relevant part of the build file:

project(':some') {
    apply plugin: 'net.bytebuddy.byte-buddy-gradle-plugin'

    byteBuddy {
        transformation {
            plugin = SomePlugin.class
        }
    }

Running any Gradle task in the project results in the following warning:

The AbstractCompile.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the destinationDirectory property instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.10.1/userguide/upgrading_version_7.html#compile_task_wiring
        at org.gradle.api.tasks.compile.AbstractCompile.setDestinationDir(AbstractCompile.java:146)
        at org.gradle.api.tasks.compile.JavaCompile_Decorated.setDestinationDir(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at net.bytebuddy.build.gradle.ByteBuddyTaskConfiguration.configureDirectories(ByteBuddyTaskConfiguration.java:62)
        at net.bytebuddy.build.gradle.ByteBuddyTaskConfiguration.configureDirectories(ByteBuddyTaskConfiguration.java:32)
        at net.bytebuddy.build.gradle.AbstractByteBuddyTaskConfiguration.execute(AbstractByteBuddyTaskConfiguration.java:81)
        at net.bytebuddy.build.gradle.AbstractByteBuddyTaskConfiguration.execute(AbstractByteBuddyTaskConfiguration.java:35)
raphw commented 5 days ago

I tried to resolve this problem and adjusted. Could you build Byte Buddy from master and try to run with the updated plugin?

vyazelenko commented 5 days ago

@raphw I can confirm that the issue is fixed with the changes on master.