Gradle uploadArchives not working

Hi all,
I am trying to publish jars with their .asc files to maven central. Each time I use the following

artifacts {
releaseArtifacts jar
releaseArtifacts javadocJar
releaseArtifacts sourcesJar
}
It will not upload the correct files. it uploads acs no jars.
Then if you try and do this
releaseArtifacts file(“build/libs/${name}-${version}-sources.jar.asc”)
it will upload the acs but not the jar.

What actually is releaseArtifacts?
That is not a Gradle thing.
And you neither need to define the artifacts to release, nor the signatures manually.