tps test
This commit is contained in:
44
build.gradle
44
build.gradle
@@ -6,6 +6,12 @@ plugins {
|
||||
group = 'org.example'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
// 设置 Java 版本兼容性
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
@@ -27,5 +33,39 @@ test {
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = 'com.org.fisco.AccountGenerator'
|
||||
}
|
||||
mainClass = 'com.org.fisco.TPSTest'
|
||||
}
|
||||
|
||||
// 创建 Fat JAR(包含所有依赖的可执行jar)
|
||||
tasks.register('fatJar', Jar) {
|
||||
archiveClassifier = 'all'
|
||||
archiveFileName = 'tps-test.jar'
|
||||
|
||||
manifest {
|
||||
attributes(
|
||||
'Main-Class': 'com.org.fisco.TPSTest',
|
||||
'Implementation-Title': 'FISCO BCOS TPS Test Tool',
|
||||
'Implementation-Version': version
|
||||
)
|
||||
}
|
||||
|
||||
// 包含编译后的类
|
||||
from sourceSets.main.output
|
||||
|
||||
// 包含所有运行时依赖
|
||||
from {
|
||||
configurations.runtimeClasspath.collect {
|
||||
it.isDirectory() ? it : zipTree(it)
|
||||
}
|
||||
}
|
||||
|
||||
// 排除签名文件
|
||||
exclude 'META-INF/*.SF'
|
||||
exclude 'META-INF/*.DSA'
|
||||
exclude 'META-INF/*.RSA'
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
// 让 build 任务依赖 fatJar
|
||||
build.dependsOn fatJar
|
||||
Reference in New Issue
Block a user