Chore: update gradle wrapper & append sha256sum

This commit is contained in:
kr328
2021-05-15 19:15:43 +08:00
parent 44424c5c9e
commit 2f69985fe1
5 changed files with 74 additions and 42 deletions

View File

@@ -1,5 +1,7 @@
@file:Suppress("UNUSED_VARIABLE")
import java.net.URL
allprojects {
repositories {
google()
@@ -14,3 +16,15 @@ allprojects {
task("clean", type = Delete::class) {
delete(rootProject.buildDir)
}
tasks.named<Wrapper>("wrapper") {
distributionType = Wrapper.DistributionType.ALL
doLast {
val sha256 = URL("$distributionUrl.sha256").openStream()
.use { it.reader().readText().trim() }
file("gradle/wrapper/gradle-wrapper.properties")
.appendText("distributionSha256Sum=$sha256")
}
}