-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
37 lines (30 loc) · 1019 Bytes
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
plugins {
base
}
val customInstallationDir = file("$buildDir/custom/gradle-${gradle.gradleVersion}")
val customInstallation by tasks.registering(Copy::class) {
description = "Copies the current Gradle distro into '$customInstallationDir'."
from(gradle.gradleHomeDir)
into(customInstallationDir)
// preserve last modified date on each file to make it easier
// to check which files were patched by next step
val copyDetails = mutableListOf<FileCopyDetails>()
eachFile { copyDetails.add(this) }
doLast {
copyDetails.forEach { details ->
File(customInstallationDir, details.path).setLastModified(details.lastModified)
}
}
// don't bother recreating it
onlyIf { !customInstallationDir.exists() }
}
subprojects {
buildscript {
dependencyLocking.lockAllConfigurations()
}
dependencyLocking.lockAllConfigurations()
}
tasks.withType<Wrapper> {
gradleVersion = "6.7"
distributionType = Wrapper.DistributionType.ALL
}