Update to Gradle 8.6 (#245)

- Fix and clean up the pkl-commons-test build script.
- Change tests to read test packages/certs directly from
  the file system instead of packaging and reading them
  from the class path.
- Update expected checksums of some test packages.
- Fix a conflict between Pkl's and Gradle's
  Kotlin libraries in the pkl-gradle project.
- Fix build deprecation warnings.
- Ensure Gradle distribution integrity with `distributionSha256Sum`.
- Manually verify integrity of Gradle wrapper added by this commit.
This commit is contained in:
translatenix
2024-03-15 17:00:23 -07:00
committed by GitHub
parent faa7ac69bb
commit 496e064caf
26 changed files with 220 additions and 189 deletions

View File

@@ -105,7 +105,7 @@ tasks.check {
}
val validateFatJar by tasks.registering {
val outputFile = file("$buildDir/validateFatJar/result.txt")
val outputFile = file("build/validateFatJar/result.txt")
inputs.files(tasks.shadowJar)
inputs.property("nonRelocations", nonRelocations)
outputs.file(outputFile)
@@ -138,7 +138,7 @@ tasks.check {
val resolveSourcesJars by tasks.registering(ResolveSourcesJars::class) {
configuration.set(configurations.runtimeClasspath)
outputDir.set(project.file("$buildDir/resolveSourcesJars"))
outputDir.set(project.file("build/resolveSourcesJars"))
}
val fatSourcesJar by tasks.registering(MergeSourcesJars::class) {

View File

@@ -33,7 +33,7 @@ dependencies {
}
val validateHtml by tasks.registering(JavaExec::class) {
val resultFile = file("$buildDir/validateHtml/result.txt")
val resultFile = file("build/validateHtml/result.txt")
inputs.files(htmlValidator.sources)
outputs.file(resultFile)

View File

@@ -55,7 +55,7 @@ val workAroundKotlinGradlePluginBug by tasks.registering {
// A problem was found with the configuration of task ':pkl-executor:compileJava' (type 'JavaCompile').
// > Directory '[...]/pkl/pkl-executor/build/classes/kotlin/main'
// specified for property 'compileKotlinOutputClasses' does not exist.
file("$buildDir/classes/kotlin/main").mkdirs()
file("build/classes/kotlin/main").mkdirs()
}
}

View File

@@ -54,7 +54,7 @@ val validatePom by tasks.registering {
return@registering
}
val generatePomFileForLibraryPublication by tasks.existing(GenerateMavenPom::class)
val outputFile = file("$buildDir/validatePom") // dummy output to satisfy up-to-date check
val outputFile = file("build/validatePom") // dummy output to satisfy up-to-date check
dependsOn(generatePomFileForLibraryPublication)
inputs.file(generatePomFileForLibraryPublication.get().destination)