Skip to content

Warning with Gradle 8.12 #6

@ingokegel

Description

@ingokegel

When using unmeta with Gradle 8.12, the warning

Invocation of Task.project at execution time has been deprecated. This will fail with an error in Gradle 10.0. This API is incompatible with the configuration cache, which will become the only mode supported by Gradle in a future release. Consult the upgrading guide for further information: https://docs.gradle.org/8.12/userguide/upgrading_version_7.html#task_project
at jdk.proxy1/jdk.proxy1.$Proxy92.onProjectAccess(Unknown Source)
at org.gradle.internal.cc.impl.AbstractTaskProjectAccessChecker.notifyProjectAccess(TaskExecutionAccessCheckers.kt:47)
at org.gradle.api.internal.AbstractTask.getProject(AbstractTask.java:238)
at org.gradle.api.DefaultTask.getProject(DefaultTask.java:59)
at io.github.izhangzhihao.unmeta.UnmetaTask.unmetaAction(UnmetaTask.kt:31)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)

is printed. You would have to capture access to project such as project.buildDir in a field, so that there is no project access in the TaskAction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions