Skip to content

Fix 'AbstractCompile.destinationDir property has been deprecated' error when using Gradle 8 #1646

Closed

Description

@surecloud-jleite

I've got this warning when using Gradle 8.11

The AbstractCompile.destinationDir property has been deprecated.org.jsonschema2pojo

This is scheduled to be removed in Gradle 9.0.
The AbstractCompile.destinationDir property has been deprecated.

Activity

  1. unkish commented on Dec 10, 2024

    @unkish
    Collaborator

    Hi

    Since jsonschema2pojo-gradle-plugin does not explicitly reference AbstractCompile#destinationDir then theoretically given warning should not pose a problem.

    I've managed to trace down the source/location of given warning to

    configuration.targetVersion = compileJavaTask.getProperties().get("sourceCompatibility")

    It looks like that warning is emited due usage of meta properties field (.properties()).
    Replacing it with

    configuration.targetVersion = compileJavaTask.sourceCompatibility

    would make warning go away.

    @joelittlejohn what would be your opinion here - should the change be applied or it's not worth it ?

  2. joelittlejohn commented on Dec 11, 2024

    @joelittlejohn
    Owner

    Thanks for digging into this @unkish. Yes, this looks like a good change to me.

  3. added this to the milestone on Jun 23, 2025
  4. changed the title [-]The AbstractCompile.destinationDir property has been deprecated[/-] [+]Fix 'AbstractCompile.destinationDir property has been deprecated' error when using Gradle 8[/+] on Jan 31, 2026
  5. modified the milestones: , 1.3.0 on Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions