gradle项目,连同依赖一起打jar包

def mainClassName = "你需要执行的main方法所在的的包名+类名"
jar {
    manifest {
        attributes "Main-Class": "$mainClassName"
    }

    from {
        configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
    }
}

 

 

https://blog.csdn.net/chszs/article/details/69951839

 

https://www.jianshu.com/p/8ddb6c58ab26?mType=Group

 

https://www.cnblogs.com/yjmyzz/p/executable-jar.html

 

https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/gradle-plugin/reference/html/

你可能感兴趣的:(gradle,gradle)