Skip to content
Merged
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
1 change: 1 addition & 0 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies {
api(project(":cel-core"))
api(project(":cel-generated-antlr", "shadow"))
api(project(":cel-generated-pb"))
api(project(":cel-generated-pb3"))
api(project(":cel-conformance"))
api(project(":cel-jackson"))
api(project(":cel-tools"))
Expand Down
8 changes: 5 additions & 3 deletions conformance/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ sourceSets.main {
java.srcDir(layout.buildDirectory.dir("generated/source/proto/main/grpc"))
}

configurations.all { exclude(group = "org.projectnessie.cel", module = "cel-generated-pb") }

dependencies {
implementation(project(":cel-core"))
implementation(testFixtures(project(":cel-core")))
implementation(testFixtures(project(":cel-generated-pb")))
implementation(testFixtures(project(":cel-generated-pb3")))

implementation(libs.protobuf.java)
implementation(libs.protobuf.java) { version { strictly(libs.versions.protobuf3.get()) } }

implementation(libs.grpc.protobuf)
implementation(libs.grpc.stub)
Expand All @@ -59,7 +61,7 @@ configure<ProtobufExtension> {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = "com.google.protobuf:protoc:${libs.versions.protobuf.get()}"
artifact = "com.google.protobuf:protoc:${libs.versions.protobuf3.get()}"
}
plugins {
this.create("grpc") { artifact = "io.grpc:protoc-gen-grpc-java:${libs.versions.grpc.get()}" }
Expand Down
58 changes: 58 additions & 0 deletions generated-pb3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (C) 2021 The Authors of CEL-Java
*
* 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
*
* http://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.
*/

import com.google.protobuf.gradle.ProtobufExtension
import com.google.protobuf.gradle.ProtobufPlugin

plugins {
`java-library`
`maven-publish`
signing
`cel-conventions`
`java-test-fixtures`
}

apply<ProtobufPlugin>()

sourceSets.main {
java.srcDir(layout.buildDirectory.dir("generated/source/proto/main/java"))
java.destinationDirectory.set(layout.buildDirectory.dir("classes/java/generated"))
}

sourceSets.test {
java.srcDir(layout.buildDirectory.dir("generated/source/proto/test/java"))
java.destinationDirectory.set(layout.buildDirectory.dir("classes/java/generatedTest"))
}

dependencies {
api(libs.protobuf.java) { version { strictly(libs.versions.protobuf3.get()) } }

// Since we need the protobuf stuff in this cel-core module, it's easy to generate the
// gRPC code as well. But do not expose the gRPC dependencies "publicly".
compileOnly(libs.grpc.protobuf)
compileOnly(libs.grpc.stub)
compileOnly(libs.tomcat.annotations.api)
}

// *.proto files taken from https://github.com/googleapis/googleapis/ repo, available as a git
// submodule
configure<ProtobufExtension> {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = "com.google.protobuf:protoc:${libs.versions.protobuf3.get()}"
}
}
1 change: 1 addition & 0 deletions generated-pb3/src
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jmh = "1.37"
junit = "5.10.3"
nessieBuildPlugins = "0.2.24"
nessieRunPlugin = "0.27.3"
protobuf = "3.25.4"
protobuf = "4.27.3"
protobuf3 = "3.25.4"
protobufPlugin = "0.9.4"
shadowPlugin = "8.1.1"
slf4j = "1.7.36"
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ celProject("generated-antlr")

celProject("generated-pb")

celProject("generated-pb3")

celProject("core")

celProject("jackson")
Expand Down