Swing code not working with new gradle 6 api

Everytime I am getting compileSwinguiJava’. failed.

in my build.gradle the code is something like :

swinguiCompile project(path: ‘:Project’, configuration: ‘swinguiCompile’)

any help would be appreciated