Idea打包可运行的jar

2019-08-22  本文已影响0人  andforce
jar {
    manifest {
        attributes("Manifest-Version": "1.0",
                "Main-Class": "Main");
    }
}

task fatJar(type: Jar) {
    manifest.from jar.manifest
    classifier = 'all'
    from {
        configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
    } {
        exclude "META-INF/*.SF"
        exclude "META-INF/*.DSA"
        exclude "META-INF/*.RSA"
    }
    with jar
}
上一篇 下一篇

猜你喜欢

热点阅读