Ant taskdef jwsc/wsdlc/clientgen to Gradle Migration

It seems to have unlocked that step but I caught another mistake

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\webservice\build.gradle’ line: 95

  • What went wrong:
    Execution failed for task ‘:prova’.

Could not find method asPath() for arguments [build_7uaczx29ubeumwahgj7bgyhpw$_run_closure8$_closure16$_closure17@512a7ba7] on configuration ‘:jwsc’ of type org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.

  • Try:
    Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:prova’.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:187)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)

the build gradle draft is

task prova {
doLast {
ant.taskdef(name: ‘jwsc’,
classname: ‘weblogic.wsee.tools.anttasks.JwscTask’,
classpath: configurations.antJwsc.asPath)
ant.jwsc (
srcdir : ‘${source_dir}’,
destdir : ‘${war_dir}’,
debug : ‘true’,
classpath : configurations.jwsc.asPath{ /this is 95 Line/
module (name : ‘warname’) {
jws file: ‘prova/webservice/X2YServicesImpl.java’
//type: ‘JAXWS’
descriptor file: ‘WebContent/WEB-INF/web.xml’
descriptor file: ‘WebContent/WEB-INF/weblogic.xml’
}
}
)
}
}

Am I wrong in something?