Gradle - jar file name in java plugin

前端 未结 9 1837
借酒劲吻你
借酒劲吻你 2021-02-01 11:46

I am trying with Gradle first time. I am trying with a maven java project to compile and create a jar file. It is compiling and creating the jar file in build/libs directory as

9条回答
  •  北恋
    北恋 (楼主)
    2021-02-01 12:44

    I recently migrated to gradle 4.6 (from 3. something) and the

    jar {
        baseName = 'myjarname'
    }
    

    stopped working, gradle named my jar from the folder name.

    So I switched to archivesBaseName = 'myjarname' which works.

    Maybe this helps somebody else too.

提交回复
热议问题