typescript-generator icon indicating copy to clipboard operation
typescript-generator copied to clipboard

The plugin does not support the upcoming Gradle 8.0

Open sergeykad opened this issue 1 year ago • 2 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

sergeykad avatar Oct 31 '22 12:10 sergeykad

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?

vojtechhabarta avatar Nov 17 '22 21:11 vojtechhabarta

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.

sergeykad avatar Nov 21 '22 08:11 sergeykad