Publishing non-jar files in gradle

前端 未结 1 529
情深已故
情深已故 2021-01-15 23:31

I am having a set of files (specifically a set of json documents) that I need to publish to my Maven repository.

How do I use publishing and specify the directory in

1条回答
  •  醉梦人生
    2021-01-16 00:06

    You can create a task to zip all your documents and then publish the zip.

    task jsonZip(type: Zip) {
        source file(/path/to/dir)
    }
    
    publications {
        myPublication(MavenPublication) {
            artifact jsonZip.archivePath
        }
    
    }
    

    0 讨论(0)
提交回复
热议问题