mirror of
https://github.com/apple/pkl.git
synced 2026-07-11 07:32:56 +02:00
Introduces Bytes class (#1019)
This introduces a new `Bytes` standard library class, for working with binary data. * Add Bytes class to the standard library * Change CLI to eval `output.bytes` * Change code generators to map Bytes to respective underlying type * Add subscript and concat operator support * Add binary encoding for Bytes * Add PCF and Plist rendering for Bytes Co-authored-by: Kushal Pisavadia <kushi.p@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2025 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.
|
||||
@@ -51,6 +51,7 @@ public abstract class EvalTask extends ModulesTask {
|
||||
public abstract Property<String> getModuleOutputSeparator();
|
||||
|
||||
@Input
|
||||
@Optional
|
||||
public abstract Property<String> getExpression();
|
||||
|
||||
private final Provider<CliEvaluator> cliEvaluator =
|
||||
@@ -65,7 +66,7 @@ public abstract class EvalTask extends ModulesTask {
|
||||
getModuleOutputSeparator().get(),
|
||||
mapAndGetOrNull(
|
||||
getMultipleFileOutputDir(), it -> it.getAsFile().getAbsolutePath()),
|
||||
getExpression().get())));
|
||||
getExpression().getOrNull())));
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@OutputFiles
|
||||
|
||||
Reference in New Issue
Block a user