The plugin does not support the upcoming Gradle 8.0
sergeykad opened this issue · 3 comments
Running the TypeScriptGenerator version 3.0.1157 on Gradle 7.5 results in the following warning message:
Invocation of Task.project at execution time has been deprecated. This will fail with an error in Gradle 8.0. Consult the upgrading guide for further information: https://docs.gradle.org/7.5/userguide/upgrading_version_7.html#task_project
I wasn't able to reproduce the problem. I tried sample-gradle project with Gradle 7.5 and 7.5.1 (with --warning-mode all
).
Do you have different setup?
I have the following build configuration:
plugins {
id 'java'
id "cz.habarta.typescript-generator" version "3.0.1157"
}
sourceSets {
main {
java {
resources {
srcDir 'build/typescript-generator'
}
}
}
}
generateTypeScript {
jsonLibrary = 'jackson2'
requiredAnnotations = ['javax.validation.constraints.NotNull']
classes = ['com.company.config.ConfigContext']
outputKind = 'module'
}
It produces the following output:
Task :module-name:generateTypeScript
Running TypeScriptGenerator version 3.0.1157
Invocation of Task.project at execution time has been deprecated. This will fail with an error in Gradle 8.0. Consult the upgrading guide for further information: https://docs.gradle.org/7.5/userguide/upgrading_version_7.html#task_project
Loading class javax.validation.constraints.NotNull
Scanning classpath
I am not an expert on Gradle, but I suspect that GenerateTask.java line 232 (for (Task task : getProject().getTasks())
) trips it.