build: 为项目支持可重现构建.

为确保项目的使用者(无论是开发者, 还是最终用户)可以完全重现构建, 确保安全, 故调整相关配置, 以实现"可重现构建".
有关可重现构建, 可以看这个: https://reproducible-builds.org/
This commit is contained in:
2022-08-06 03:23:35 +08:00
parent d586ca378e
commit 673c6d8392
3 changed files with 15 additions and 0 deletions

View File

@ -36,6 +36,11 @@ java {
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}