Files
wehub-resource-sync a9cd7750f4
CI / unit-test (push) Has been cancelled
CI / detect-changes (push) Has been cancelled
CI / build (push) Has been cancelled
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
CI / test-harness (push) Has been cancelled
CI / generate-e2e-matrix (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / build-ui (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
UI v2 Integration CI / E2E (Integration) (push) Has been cancelled
UI v2 CI / Lint, Format & Test (push) Has been cancelled
UI v2 CI / E2E (Mocked) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:37:56 +08:00

97 lines
3.1 KiB
Groovy

/*
* Copyright 2023 Conductor authors
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
*/
buildscript {
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.5'
}
}
plugins {
id 'java'
id 'idea'
id "com.google.protobuf" version "0.9.6"
}
repositories{
maven { url "https://mvnrepository.com/artifact" }
}
dependencies {
implementation project(':conductor-common')
implementation "com.google.protobuf:protobuf-java:${revProtoBuf}"
implementation "io.grpc:grpc-protobuf:${revGrpc}"
implementation "io.grpc:grpc-stub:${revGrpc}"
implementation "io.grpc:grpc-xds:${revGrpc}"
implementation "jakarta.annotation:jakarta.annotation-api:${revJakartaAnnotation}"
implementation "javax.annotation:javax.annotation-api:1.3.2" //Needs to be added as a workaround for the generated tags
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.core:jackson-core"
implementation "com.fasterxml.jackson.core:jackson-annotations"
}
// PINNED (#964): protoc must match protobuf-java 3.x used by grpc-protobuf:1.73.0.
// Using protoc 4.x generates code incompatible with the 3.x runtime.
// See: https://github.com/grpc/grpc-java/issues/12246
def artifactName = 'com.google.protobuf:protoc:3.25.5'
switch (org.gradle.internal.os.OperatingSystem.current()) {
case org.gradle.internal.os.OperatingSystem.LINUX:
artifactName = "com.google.protobuf:protoc:3.25.5"
break;
case org.gradle.internal.os.OperatingSystem.MAC_OS:
artifactName = "com.google.protobuf:protoc:3.25.5"
break;
case org.gradle.internal.os.OperatingSystem.WINDOWS:
artifactName = "com.google.protobuf:protoc:3.25.5"
break;
}
protobuf {
protoc {
artifact = artifactName
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${revGrpc}"
}
}
generateProtoTasks {
processResources.dependsOn extractProto
all()*.plugins {
grpc {}
}
all()*.dependsOn(':conductor-common:protogen')
}
}
idea {
module {
sourceDirs += file("${projectDir}/build/generated/source/proto/main/java");
sourceDirs += file("${projectDir}/build/generated/source/proto/main/grpc");
}
}
sourceSets {
main {
java {
srcDir 'build/generated/source/proto/main/java'
srcDir 'build/generated/source/proto/main/grpc'
}
}
}
tasks.getByPath(':conductor-grpc:sourcesJar').dependsOn(':conductor-grpc:generateProto')
compileJava.dependsOn(tasks.getByPath(':conductor-common:protogen'))