From f4cb7c0710b669058c1323a5a3942dddd1a797f0 Mon Sep 17 00:00:00 2001 From: Sokwhan Huh Date: Thu, 4 Sep 2025 13:45:12 -0700 Subject: [PATCH] Prepare 0.11.0 release Also migrate to new Central Portal per https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/ PiperOrigin-RevId: 803159119 --- MODULE.bazel | 14 ++-- README.md | 4 +- .../test/java/dev/cel/conformance/BUILD.bazel | 1 + publish/BUILD.bazel | 1 + publish/cel_version.bzl | 2 +- publish/publish.sh | 65 ++++++++++++++----- 6 files changed, 61 insertions(+), 26 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 074275484..de3cbdace 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -39,6 +39,8 @@ GUAVA_VERSION = "33.4.8" TRUTH_VERSION = "1.4.4" +PROTOBUF_JAVA_VERSION = "4.32.0" + # Compile only artifacts [ maven.artifact( @@ -49,7 +51,7 @@ TRUTH_VERSION = "1.4.4" ) for group, artifact, version in [coord.split(":") for coord in [ "com.google.code.findbugs:annotations:3.0.1", - "com.google.errorprone:error_prone_annotations:2.38.0", + "com.google.errorprone:error_prone_annotations:2.41.0", ]] ] @@ -80,15 +82,15 @@ maven.install( "com.google.auto.value:auto-value:1.11.0", "com.google.auto.value:auto-value-annotations:1.11.0", "com.google.guava:guava:" + GUAVA_VERSION + "-jre", - "com.google.protobuf:protobuf-java:4.31.0", - "com.google.protobuf:protobuf-java-util:4.31.0", + "com.google.protobuf:protobuf-java:" + PROTOBUF_JAVA_VERSION, + "com.google.protobuf:protobuf-java-util:" + PROTOBUF_JAVA_VERSION, "com.google.re2j:re2j:1.8", "info.picocli:picocli:4.7.7", "org.antlr:antlr4-runtime:4.13.2", "org.freemarker:freemarker:2.3.34", "org.jspecify:jspecify:1.0.0", "org.threeten:threeten-extra:1.8.0", - "org.yaml:snakeyaml:2.4", + "org.yaml:snakeyaml:2.5", ], repositories = [ "https://maven.google.com", @@ -100,7 +102,7 @@ maven.install( # keep sorted artifacts = [ "com.google.guava:guava:" + GUAVA_VERSION + "-android", - "com.google.protobuf:protobuf-javalite:4.31.0", + "com.google.protobuf:protobuf-javalite:" + PROTOBUF_JAVA_VERSION, ], repositories = [ "https://maven.google.com", @@ -112,7 +114,7 @@ maven.install( maven.install( name = "maven_conformance", - artifacts = ["dev.cel:cel:0.11.0-SNAPSHOT"], + artifacts = ["dev.cel:cel:0.11.0"], repositories = [ "https://maven.google.com", "https://repo1.maven.org/maven2", diff --git a/README.md b/README.md index 44904daea..61ac687b9 100644 --- a/README.md +++ b/README.md @@ -55,14 +55,14 @@ CEL-Java is available in Maven Central Repository. [Download the JARs here][8] o dev.cel cel - 0.10.1 + 0.11.0 ``` **Gradle** ```gradle -implementation 'dev.cel:cel:0.10.1' +implementation 'dev.cel:cel:0.11.0' ``` Then run this example: diff --git a/conformance/src/test/java/dev/cel/conformance/BUILD.bazel b/conformance/src/test/java/dev/cel/conformance/BUILD.bazel index 7283e2977..69755324d 100644 --- a/conformance/src/test/java/dev/cel/conformance/BUILD.bazel +++ b/conformance/src/test/java/dev/cel/conformance/BUILD.bazel @@ -49,6 +49,7 @@ java_library( tags = ["conformance_maven"], deps = MAVEN_JAR_DEPS + [ "//:java_truth", + "//parser:parser_factory", # TODO: Remove next OSS release "//testing:expr_value_utils", "@cel_spec//proto/cel/expr:expr_java_proto", "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", diff --git a/publish/BUILD.bazel b/publish/BUILD.bazel index 368598f2c..9ca6eb770 100644 --- a/publish/BUILD.bazel +++ b/publish/BUILD.bazel @@ -24,6 +24,7 @@ LITE_RUNTIME_TARGETS = [ COMPILER_TARGETS = [ "//parser/src/main/java/dev/cel/parser", + "//parser/src/main/java/dev/cel/parser:parser_factory", "//parser/src/main/java/dev/cel/parser:parser_builder", "//parser/src/main/java/dev/cel/parser:unparser", "//checker/src/main/java/dev/cel/checker:checker", diff --git a/publish/cel_version.bzl b/publish/cel_version.bzl index 996cea72d..935b2f7b1 100644 --- a/publish/cel_version.bzl +++ b/publish/cel_version.bzl @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. """Maven artifact version for CEL.""" -CEL_VERSION = "0.10.1" +CEL_VERSION = "0.11.0" diff --git a/publish/publish.sh b/publish/publish.sh index 888bf894e..9dc88deda 100755 --- a/publish/publish.sh +++ b/publish/publish.sh @@ -24,28 +24,59 @@ # 1. You must create a pgp certificate and upload it to keyserver.ubuntu.com. See https://blog.sonatype.com/2010/01/how-to-generate-pgp-signatures-with-maven/ # 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. +# Note, to run script: Bazel and jq are required 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") JDK8_FLAGS="--java_language_version=8 --java_runtime_version=8" function publish_maven_remote() { maven_repo_url=$1 - # Credentials should be read from maven config (settings.xml) once it - # is supported by bazelbuild: - # https://github.com/bazelbuild/rules_jvm_external/issues/679 - read -p "maven_user: " maven_user - read -s -p "maven_password: " maven_password - for PUBLISH_TARGET in "${ALL_TARGETS[@]}" - do - bazel run --stamp \ - --define "maven_repo=$maven_repo_url" \ - --define gpg_sign=true \ - --define "maven_user=$maven_user" \ - --define "maven_password=$maven_password" \ - $PUBLISH_TARGET \ - $JDK8_FLAGS - done + # Credentials should be read from maven config (settings.xml) once it + # is supported by bazelbuild: + # https://github.com/bazelbuild/rules_jvm_external/issues/679 + read -p "maven_user: " maven_user + read -s -p "maven_password: " maven_password + # Upload artifacts to staging repository + for PUBLISH_TARGET in "${ALL_TARGETS[@]}" + do + bazel run --stamp \ + --define "maven_repo=$maven_repo_url" \ + --define gpg_sign=true \ + --define "maven_user=$maven_user" \ + --define "maven_password=$maven_password" \ + $PUBLISH_TARGET \ + $JDK8_FLAGS + done + + # Begin creating a staging deployment in central maven + auth_token=$(printf "%s:%s" "$maven_user" "$maven_password" | base64) + repository_key=$(curl -s -X GET \ + -H "Authorization:Bearer $auth_token" \ + "https://ossrh-staging-api.central.sonatype.com/manual/search/repositories?ip=any&profile_id=dev.cel" | \ + jq -r '.repositories[] | select(.state=="open") | .key' | head -n 1) + echo "" + if [[ -n "$repository_key" ]]; then + echo "Open repository key:" + echo "$repository_key" + + echo "Creating deployment..." + post_response=$(curl -s -w "\n%{http_code}" -X POST \ + -H "Authorization: Bearer $auth_token" \ + "https://ossrh-staging-api.central.sonatype.com/manual/upload/repository/$repository_key") + + http_code=$(tail -n1 <<< "$post_response") + response_body=$(sed '$ d' <<< "$post_response") + + echo "----------------------------------------" + echo "Deployment API Response (HTTP Status: $http_code):" + echo "$response_body" + echo "----------------------------------------" + echo "" + echo "Proceed to https://central.sonatype.com/publishing/deployments to finalize publishing." + else + echo "No open repository was found. Likely an indication that artifacts were not uploaded." + fi } version=$(