mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Support building with JDK 21 (#234)
- Update google-java-format to a version compatible with JDK 21 and run "gw spotlessApply". - Fix wrong test assumption JavaCodeGenerator writes a properties file using java.util.Properties, which doesn't guarantee order of entries. - Fix most deprecation warnings - Add CI job for JDK 21
This commit is contained in:
@@ -4,7 +4,6 @@ import java.io.File
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.VersionCatalog
|
||||
import org.gradle.api.artifacts.VersionCatalogsExtension
|
||||
import org.gradle.api.artifacts.VersionConstraint
|
||||
import org.gradle.kotlin.dsl.getByType
|
||||
|
||||
// `buildInfo` in main build scripts
|
||||
@@ -109,7 +108,7 @@ open class BuildInfo(project: Project) {
|
||||
// only run command once per build invocation
|
||||
if (project === project.rootProject) {
|
||||
Runtime.getRuntime()
|
||||
.exec("git rev-parse --short HEAD", arrayOf(), project.rootDir)
|
||||
.exec(arrayOf("git", "rev-parse", "--short", "HEAD"), arrayOf(), project.rootDir)
|
||||
.inputStream.reader().readText().trim()
|
||||
} else {
|
||||
project.rootProject.extensions.getByType(BuildInfo::class.java).commitId
|
||||
|
||||
Reference in New Issue
Block a user