Im-Fran / SonatypeCentralUpload

A gradle plugin to upload artifacts to Sonatype Central
https://plugins.gradle.org/plugin/cl.franciscosolis.sonatype-central-upload
GNU General Public License v3.0
8 stars 2 forks source link

Android Project #4

Open UvrajSB opened 2 weeks ago

UvrajSB commented 2 weeks ago

I am trying to upload an android library to maven central. I am not sure what to put in archives = files( ????)

Thanks in advance

Im-Fran commented 2 weeks ago

Hi! You should put any file you need to get uploaded. I’ve never coded/uploaded android projects to maven but let’s say your projects outputs an app.jar file, you should put:

sonatypeCentralUpload {
    /* ... */
    archives = files(/*...*/)                       // This is a list of files to upload. Ideally you would point to your jar file, source and
    /* ... */
}

Inside files you can put a list of paths, for example files(file(“build/libs/output/app.jar")) (I believe that’s the way to specify a list of files)