mirror of
https://github.com/apple/pkl.git
synced 2026-04-24 09:18:35 +02:00
This adds support for Windows. The in-language path separator is still `/`, to ensure Pkl programs are cross-platform. Log lines are written using CRLF endings on Windows. Modules that are combined with `--module-output-separator` uses LF endings to ensure consistent rendering across platforms. `jpkl` does not work on Windows as a direct executable. However, it can work with `java -jar jpkl`. Additional details: * Adjust git settings for Windows * Add native executable for pkl cli * Add jdk17 windows Gradle check in CI * Adjust CI test reports to be staged within Gradle rather than by shell script. * Fix: encode more characters that are not safe Windows paths * Skip running tests involving symbolic links on Windows (these require administrator privileges to run). * Introduce custom implementation of `IoUtils.relativize` * Allow Gradle to initialize ExecutableJar `Property` values * Add Gradle flag to enable remote JVM debugging Co-authored-by: Philip K.F. Hölzenspies <holzensp@gmail.com>
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
//===----------------------------------------------------------------------===//
|
|
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
//===----------------------------------------------------------------------===//
|
|
extends "GradleJob.pkl"
|
|
|
|
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
|
|
|
|
javaVersion: "17.0"|"21.0"
|
|
|
|
os = "linux"
|
|
|
|
steps {
|
|
new Config.RunStep {
|
|
name = "gradle check"
|
|
command = "./gradlew \(module.gradleArgs) check"
|
|
}
|
|
}
|
|
|
|
job {
|
|
when (os == "linux") {
|
|
docker {
|
|
new {
|
|
image = "cimg/openjdk:\(javaVersion)"
|
|
}
|
|
}
|
|
}
|
|
when (os == "windows") {
|
|
machine {
|
|
image = "windows-server-2022-gui:current"
|
|
}
|
|
resource_class = "windows.large"
|
|
}
|
|
}
|