Skip to content

Commit f89fffc

Browse files
l46kokcopybara-github
authored andcommitted
Prepare for 0.10.0 release
Fixes #678 PiperOrigin-RevId: 767349422
1 parent 0268902 commit f89fffc

File tree

16 files changed

+115
-27
lines changed

16 files changed

+115
-27
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ CEL-Java is available in Maven Central Repository. [Download the JARs here][8] o
5555
<dependency>
5656
<groupId>dev.cel</groupId>
5757
<artifactId>cel</artifactId>
58-
<version>0.9.0</version>
58+
<version>0.10.0</version>
5959
</dependency>
6060
```
6161

6262
**Gradle**
6363

6464
```gradle
65-
implementation 'dev.cel:cel:0.9.0'
65+
implementation 'dev.cel:cel:0.10.0'
6666
```
6767

6868
Then run this example:

WORKSPACE

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,17 @@ register_toolchains(
206206

207207
### googleapis setup
208208

209-
# as of 12/08/2022
209+
# as of 06/06/2025
210210
http_archive(
211211
name = "com_google_googleapis",
212-
sha256 = "8503282213779a3c230251218c924f385f457a053b4f82ff95d068f71815e558",
213-
strip_prefix = "googleapis-d73a41615b101c34c58b3534c2cc7ee1d89cccb0",
212+
sha256 = "228c134e606a10d9103ff2b22622989bbf13cc2a54ff626ff9ef6c1c7713e3b8",
213+
strip_prefix = "googleapis-1804a603281707a1f0e6fff27851cae115ac3c8b",
214214
urls = [
215-
"https://github.com/googleapis/googleapis/archive/d73a41615b101c34c58b3534c2cc7ee1d89cccb0.tar.gz",
215+
"https://github.com/googleapis/googleapis/archive/1804a603281707a1f0e6fff27851cae115ac3c8b.tar.gz",
216216
],
217217
)
218218

219+
219220
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
220221

221222
switched_rules_by_language(
@@ -264,16 +265,6 @@ http_archive(
264265
],
265266
)
266267

267-
# required by cel_spec
268-
http_archive(
269-
name = "io_bazel_rules_go",
270-
sha256 = "19ef30b21eae581177e0028f6f4b1f54c66467017be33d211ab6fc81da01ea4d",
271-
urls = [
272-
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.0/rules_go-v0.38.0.zip",
273-
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.0/rules_go-v0.38.0.zip",
274-
],
275-
)
276-
277268
http_jar(
278269
name = "antlr4_jar",
279270
sha256 = "eae2dfa119a64327444672aff63e9ec35a20180dc5b8090b7a6ab85125df4d76",

common/src/main/java/dev/cel/common/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ java_library(
9696
],
9797
deps = [
9898
"//:auto_value",
99+
"//common/annotations",
99100
"@maven//:com_google_errorprone_error_prone_annotations",
100101
],
101102
)

common/src/main/java/dev/cel/common/CelOptions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.google.auto.value.AutoValue;
1818
import com.google.errorprone.annotations.CheckReturnValue;
1919
import com.google.errorprone.annotations.Immutable;
20+
import dev.cel.common.annotations.Beta;
2021

2122
/**
2223
* Options to configure how the CEL parser, type-checker, and evaluator behave.
@@ -434,6 +435,7 @@ public abstract static class Builder {
434435
*
435436
* <p>Warning: This option is experimental.
436437
*/
438+
@Beta
437439
public abstract Builder enableCelValue(boolean value);
438440

439441
/**

common/src/main/java/dev/cel/common/annotations/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package(
1111

1212
# keep sorted
1313
ANNOTATION_SOURCES = [
14+
"Beta.java",
1415
"Generated.java",
1516
"Internal.java",
1617
]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package dev.cel.common.annotations;
16+
17+
import java.lang.annotation.ElementType;
18+
import java.lang.annotation.Retention;
19+
import java.lang.annotation.RetentionPolicy;
20+
import java.lang.annotation.Target;
21+
22+
/**
23+
* Indicates a public API that can change at any time, and has no guarantee of API stability and
24+
* backward-compatibility.
25+
*
26+
* <p>Note: This annotation is intended only for CEL library code. Users should not attach this
27+
* annotation to their own code.
28+
*/
29+
@Retention(RetentionPolicy.CLASS)
30+
@Target({
31+
ElementType.ANNOTATION_TYPE,
32+
ElementType.CONSTRUCTOR,
33+
ElementType.FIELD,
34+
ElementType.METHOD,
35+
ElementType.PACKAGE,
36+
ElementType.TYPE
37+
})
38+
public @interface Beta {}

common/src/main/java/dev/cel/common/values/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ java_library(
308308
":base_proto_message_value_provider",
309309
":cel_value",
310310
":proto_message_lite_value",
311+
"//common/annotations",
311312
"//common/internal:cel_lite_descriptor_pool",
312313
"//common/internal:default_lite_descriptor_pool",
313314
"//common/values:base_proto_cel_value_converter",
@@ -327,6 +328,7 @@ cel_android_library(
327328
":base_proto_message_value_provider_android",
328329
":cel_value_android",
329330
":proto_message_lite_value_android",
331+
"//common/annotations",
330332
"//common/internal:cel_lite_descriptor_pool_android",
331333
"//common/internal:default_lite_descriptor_pool_android",
332334
"//common/values:base_proto_cel_value_converter_android",

common/src/main/java/dev/cel/common/values/ProtoMessageLiteValueProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.google.common.collect.ImmutableSet;
1818
import com.google.errorprone.annotations.Immutable;
1919
import com.google.protobuf.MessageLite;
20+
import dev.cel.common.annotations.Beta;
2021
import dev.cel.common.internal.CelLiteDescriptorPool;
2122
import dev.cel.common.internal.DefaultLiteDescriptorPool;
2223
import dev.cel.protobuf.CelLiteDescriptor;
@@ -30,6 +31,7 @@
3031
* fully qualified name and its fields to populate.
3132
*/
3233
@Immutable
34+
@Beta
3335
public class ProtoMessageLiteValueProvider extends BaseProtoMessageValueProvider {
3436
private final CelLiteDescriptorPool descriptorPool;
3537
private final ProtoLiteCelValueConverter protoLiteCelValueConverter;

policy/src/main/java/dev/cel/policy/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package(
44
default_applicable_licenses = ["//:license"],
55
default_visibility = [
66
"//policy:__pkg__",
7+
"//publish:__pkg__",
78
],
89
)
910

protobuf/src/main/java/dev/cel/protobuf/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ load("@rules_java//java:defs.bzl", "java_binary", "java_library")
22

33
package(
44
default_applicable_licenses = ["//:license"],
5-
default_visibility = ["//protobuf:__pkg__"],
5+
default_visibility = [
6+
"//protobuf:__pkg__",
7+
"//publish:__pkg__",
8+
],
69
)
710

811
java_binary(

publish/BUILD.bazel

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ RUNTIME_TARGETS = [
1313
"//runtime/src/main/java/dev/cel/runtime:unknown_attributes",
1414
]
1515

16+
LITE_RUNTIME_TARGETS = [
17+
"//runtime/src/main/java/dev/cel/runtime:lite_runtime_android",
18+
"//runtime/src/main/java/dev/cel/runtime:lite_runtime_factory_android",
19+
"//runtime/src/main/java/dev/cel/runtime:lite_runtime_library_android",
20+
"//common/src/main/java/dev/cel/common:proto_ast_android", # Note: included due to generated protos requiring protolite dependency
21+
"//common/src/main/java/dev/cel/common/values:proto_message_lite_value_provider_android",
22+
"//protobuf/src/main/java/dev/cel/protobuf:cel_lite_descriptor",
23+
]
24+
1625
COMPILER_TARGETS = [
1726
"//parser/src/main/java/dev/cel/parser",
1827
"//parser/src/main/java/dev/cel/parser:parser_builder",
@@ -47,6 +56,21 @@ OPTIMIZER_TARGETS = [
4756
"//optimizer/src/main/java/dev/cel/optimizer/optimizers:common_subexpression_elimination",
4857
]
4958

59+
POLICY_COMPILER_TARGETS = [
60+
"//policy/src/main/java/dev/cel/policy:policy",
61+
"//policy/src/main/java/dev/cel/policy:source",
62+
"//policy/src/main/java/dev/cel/policy:validation_exception",
63+
"//policy/src/main/java/dev/cel/policy:parser_factory",
64+
"//policy/src/main/java/dev/cel/policy:yaml_parser",
65+
"//policy/src/main/java/dev/cel/policy:parser",
66+
"//policy/src/main/java/dev/cel/policy:parser_builder",
67+
"//policy/src/main/java/dev/cel/policy:compiler",
68+
"//policy/src/main/java/dev/cel/policy:compiler_builder",
69+
"//policy/src/main/java/dev/cel/policy:compiler_factory",
70+
"//policy/src/main/java/dev/cel/policy:policy_parser_context",
71+
"//policy/src/main/java/dev/cel/policy:compiled_rule",
72+
]
73+
5074
V1ALPHA1_AST_TARGETS = [
5175
"//common/src/main/java/dev/cel/common:proto_v1alpha1_ast",
5276
]
@@ -62,7 +86,7 @@ EXTENSION_TARGETS = [
6286

6387
ALL_TARGETS = [
6488
"//bundle/src/main/java/dev/cel/bundle:cel",
65-
] + RUNTIME_TARGETS + COMPILER_TARGETS + EXTENSION_TARGETS + V1ALPHA1_AST_TARGETS + CANONICAL_AST_TARGETS + OPTIMIZER_TARGETS + VALIDATOR_TARGETS
89+
] + RUNTIME_TARGETS + COMPILER_TARGETS + EXTENSION_TARGETS + V1ALPHA1_AST_TARGETS + CANONICAL_AST_TARGETS + OPTIMIZER_TARGETS + VALIDATOR_TARGETS + POLICY_COMPILER_TARGETS
6690

6791
# Excluded from the JAR as their source of truth is elsewhere
6892
EXCLUDED_TARGETS = [
@@ -178,3 +202,24 @@ java_export(
178202
pom_template = ":cel_protobuf_pom",
179203
runtime_deps = CANONICAL_AST_TARGETS,
180204
)
205+
206+
pom_file(
207+
name = "cel_runtime_android_pom",
208+
substitutions = {
209+
"CEL_VERSION": CEL_VERSION,
210+
"CEL_ARTIFACT_ID": "runtime-android",
211+
"PACKAGE_NAME": "CEL Java Runtime for Android",
212+
"PACKAGE_DESC": "Common Expression Language Lite Runtime for Java (Suitable for Android)",
213+
},
214+
targets = LITE_RUNTIME_TARGETS,
215+
template_file = "pom_template.xml",
216+
)
217+
218+
java_export(
219+
name = "cel_runtime_android",
220+
deploy_env = EXCLUDED_TARGETS,
221+
javadocopts = JAVA_DOC_OPTIONS,
222+
maven_coordinates = "dev.cel:runtime-android:%s" % CEL_VERSION,
223+
pom_template = ":cel_runtime_android_pom",
224+
runtime_deps = LITE_RUNTIME_TARGETS,
225+
)

publish/cel_version.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
"""Maven artifact version for CEL."""
15-
CEL_VERSION = "0.9.1"
15+
CEL_VERSION = "0.10.0"

publish/publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# 2. You will need to enter the key's password. The prompt appears in GUI, not in terminal. The publish operation will eventually timeout if the password is not entered.
2626

2727

28-
ALL_TARGETS=("//publish:cel.publish" "//publish:cel_compiler.publish" "//publish:cel_runtime.publish" "//publish:cel_v1alpha1.publish" "//publish:cel_protobuf.publish")
28+
ALL_TARGETS=("//publish:cel.publish" "//publish:cel_compiler.publish" "//publish:cel_runtime.publish" "//publish:cel_v1alpha1.publish" "//publish:cel_protobuf.publish" "//publish:cel_runtime_android.publish")
2929
JDK8_FLAGS="--java_language_version=8 --java_runtime_version=8"
3030

3131
function publish_maven_remote() {

runtime/src/main/java/dev/cel/runtime/BUILD.bazel

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -648,14 +648,8 @@ cel_android_library(
648648
deps = [
649649
":function_binding_android",
650650
":runtime_equality_android",
651-
":runtime_helpers_android",
652-
"//common:error_codes",
653651
"//common:options",
654-
"//common:runtime_exception",
655652
"//common/annotations",
656-
"//common/internal:comparison_functions_android",
657-
"//common/internal:proto_time_utils_android",
658-
"//common/internal:safe_string_formatter",
659653
"//runtime/standard:add_android",
660654
"//runtime/standard:bool_android",
661655
"//runtime/standard:bytes_android",
@@ -831,6 +825,7 @@ java_library(
831825
"//:auto_value",
832826
"//common:cel_ast",
833827
"//common:options",
828+
"//common/annotations",
834829
"//common/values:cel_value_provider",
835830
"//runtime/standard:standard_function",
836831
"@maven//:com_google_code_findbugs_annotations",
@@ -912,6 +907,7 @@ java_library(
912907
deps = [
913908
":lite_runtime",
914909
":lite_runtime_impl",
910+
"//common/annotations",
915911
],
916912
)
917913

@@ -925,6 +921,7 @@ cel_android_library(
925921
deps = [
926922
":lite_runtime_android",
927923
":lite_runtime_impl_android",
924+
"//common/annotations",
928925
],
929926
)
930927

@@ -1085,10 +1082,10 @@ cel_android_library(
10851082
":evaluation_exception",
10861083
":function_binding_android",
10871084
":function_resolver",
1088-
":standard_functions_android",
10891085
"//:auto_value",
10901086
"//common:cel_ast_android",
10911087
"//common:options",
1088+
"//common/annotations",
10921089
"//common/values:cel_value_provider_android",
10931090
"//runtime/standard:standard_function_android",
10941091
"@maven//:com_google_code_findbugs_annotations",

runtime/src/main/java/dev/cel/runtime/CelLiteRuntime.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.google.errorprone.annotations.Immutable;
1818
import javax.annotation.concurrent.ThreadSafe;
1919
import dev.cel.common.CelAbstractSyntaxTree;
20+
import dev.cel.common.annotations.Beta;
2021
import java.util.Map;
2122

2223
/**
@@ -27,6 +28,7 @@
2728
* the protobuf, making it suitable for use in Android.
2829
*/
2930
@ThreadSafe
31+
@Beta
3032
public interface CelLiteRuntime {
3133

3234
Program createProgram(CelAbstractSyntaxTree ast) throws CelEvaluationException;

runtime/src/main/java/dev/cel/runtime/CelLiteRuntimeFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414

1515
package dev.cel.runtime;
1616

17+
import dev.cel.common.annotations.Beta;
18+
1719
/** Factory class for producing a lite runtime environment. */
20+
@Beta
1821
public final class CelLiteRuntimeFactory {
1922

2023
/** Create a new builder for constructing a {@code CelLiteRuntime} instance. */

0 commit comments

Comments
 (0)