gradle 打包可执行jar包
程序员文章站
2022-04-28 22:51:25
...
group 'android.com'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
jar {
manifest {
attributes ('Main-Class': 'com.android.signapk.SignApk',"Implementation-Title": "Gradle")
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}
dependencies {
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.60'
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.60'
compile 'org.conscrypt:conscrypt-openjdk-uber:1.4.2'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
转载于:https://my.oschina.net/zdglf/blog/3002626
下一篇: gradle项目打包jar