Signing info not inside jar META-INF

After I apply signing plugin,gradle was signed the jar file and keeps signature as separate file (testapp.jar.asc).

I want signing info inside META-INF Folder inside jar file.

Please help me to sign jar while building instead after building the jar.

apply plugin: ‘signing’

signing {
required { gradle.taskGraph.hasTask(“makeService”) }
sign configurations.archives
}

I spent more time on this but not able to crack this.

Thanks,
Slok

I came to know we can do this jar signing using ANT in gradle.

In Gradle, we have AntBuilder which do alll the job of ant tasks . what I understood is Gradle uses groovy AntBuilder under the hood.

jar.doLast {
     new File('build/signed').mkdirs();
     ant.signjar(
     destDir: 'build/signed',
     jar: 'build/libs/*.jar',
     alias:"selfsigned",
     storetype:"jks",
     keystore:"keystore.jks",
     storepass:"passqword",
     preservelastmodified:"true")
  }