Create a Groovy executable JAR with Gradle

后端 未结 4 792
陌清茗
陌清茗 2020-12-04 15:35

This is my gradle build script.

apply plugin: \'groovy\'

project.group = \"test.tree\"
archivesBaseName = \"tree\"
project.version = \"1.0\"
manifest.mainAt         


        
4条回答
  •  执笔经年
    2020-12-04 16:14

    I got the same issue, after adding jar block in build.gradle then it works.

    jar {
      manifest {
        attributes 'Main-Class': 'demo.Demo'
      }
      from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    }
    

提交回复
热议问题