Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/unwanted_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ checkUnwantedDeps '//publish:cel' '@maven_android//:com_google_protobuf_protobuf
# cel_runtime_android shouldn't depend on the full protobuf runtime or antlr
checkUnwantedDeps '//publish:cel_runtime_android' '@maven//:com_google_protobuf_protobuf_java'
checkUnwantedDeps '//publish:cel_runtime_android' '@maven//:org_antlr_antlr4_runtime'

# cel shouldn't depend on the verifier
checkUnwantedDeps '//publish:cel' '//verifier/'

exit 0
21 changes: 20 additions & 1 deletion publish/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@bazel_common//tools/maven:pom_file.bzl", "pom_file")
load("@rules_jvm_external//:defs.bzl", "java_export")
load("@rules_jvm_external//:defs.bzl", "java_export", "maven_export")
load("//publish:cel_version.bzl", "CEL_VERSION")

# Note: These targets must reference the build targets in `src` directly in
Expand Down Expand Up @@ -349,3 +349,22 @@ java_export(
pom_template = ":cel_verifier_pom",
exports = VERIFIER_TARGETS + [":cel"],
)

pom_file(
name = "cel_verifier_cli_pom",
substitutions = {
"CEL_VERSION": CEL_VERSION,
"CEL_ARTIFACT_ID": "verifier-cli",
"PACKAGE_NAME": "CEL Java Verifier CLI",
"PACKAGE_DESC": "Formal verification CLI and REPL tool for Common Expression Language for Java.",
},
targets = [],
template_file = "pom_template.xml",
)

maven_export(
name = "cel_verifier_cli",
maven_coordinates = "dev.cel:verifier-cli:%s" % CEL_VERSION,
pom_template = ":cel_verifier_cli_pom",
target = "//verifier/src/main/java/dev/cel/verifier/tools:cel_verifier_tool_deploy.jar",
)
2 changes: 1 addition & 1 deletion publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# Note, to run script: Bazel and jq are required

ALL_TARGETS=("//publish:cel_common.publish" "//publish:cel.publish" "//publish:cel_compiler.publish" "//publish:cel_runtime.publish" "//publish:cel_v1alpha1.publish" "//publish:cel_protobuf.publish" "//publish:cel_runtime_android.publish")
ALL_TARGETS=("//publish:cel_common.publish" "//publish:cel.publish" "//publish:cel_compiler.publish" "//publish:cel_runtime.publish" "//publish:cel_v1alpha1.publish" "//publish:cel_protobuf.publish" "//publish:cel_runtime_android.publish" "//publish:cel_verifier.publish" "//publish:cel_verifier_cli.publish")
JDK8_FLAGS="--java_language_version=8 --java_runtime_version=8"

function publish_maven_remote() {
Expand Down
7 changes: 7 additions & 0 deletions verifier/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,10 @@ java_library(
visibility = [":verifier_internal"],
exports = ["//verifier/src/main/java/dev/cel/verifier:z3_impl"],
)

java_library(
name = "canonicalization_optimizer",
compatible_with = [],
visibility = [":verifier_internal"],
exports = ["//verifier/src/main/java/dev/cel/verifier:canonicalization_optimizer"],
)
34 changes: 34 additions & 0 deletions verifier/src/main/java/dev/cel/verifier/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ java_library(
deps = [
":verifier",
":z3_impl",
"//bundle:cel",
"//checker:checker_builder",
"//compiler",
"//compiler:compiler_builder",
"//parser:parser_builder",
"//runtime",
],
)

Expand Down Expand Up @@ -119,6 +125,29 @@ java_library(
],
)

java_library(
name = "canonicalization_optimizer",
srcs = ["CanonicalizationOptimizer.java"],
tags = [
],
deps = [
"//:auto_value",
"//bundle:cel",
"//common:cel_ast",
"//common:mutable_ast",
"//common:mutable_source",
"//common:operator",
"//common/ast",
"//common/ast:mutable_expr",
"//common/navigation:common",
"//common/navigation:mutable_navigation",
"//common/values:cel_byte_string",
"//optimizer:ast_optimizer",
"//optimizer:mutable_ast",
"@maven//:com_google_guava_guava",
],
)

java_library(
name = "z3_impl",
srcs = [
Expand All @@ -135,10 +164,12 @@ java_library(
tags = [
],
deps = [
":canonicalization_optimizer",
":numeric_bounds",
":type_system",
":verifier",
"//:auto_value",
"//bundle:cel",
"//common:cel_ast",
"//common:compiler_common",
"//common:operator",
Expand All @@ -147,6 +178,9 @@ java_library(
"//common/types",
"//common/types:cel_types",
"//common/types:type_providers",
"//optimizer",
"//optimizer:optimization_exception",
"//optimizer:optimizer_builder",
"//verifier/axioms",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
Expand Down
Loading
Loading