Publishing non-jar files in gradle

前端 未结 1 1957
借酒劲吻你
借酒劲吻你 2021-01-15 23:20

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-15 23:57

    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)
提交回复
热议问题