diff --git a/build.gradle b/build.gradle index 0810e1c7c5f..8d6589243ae 100644 --- a/build.gradle +++ b/build.gradle @@ -128,47 +128,6 @@ configure([project(':cli'), } } -configure(project(':proto')) { - apply plugin: 'com.google.protobuf' - - dependencies { - annotationProcessor libs.lombok - compileOnly libs.javax.annotation - compileOnly libs.lombok - implementation libs.logback.classic - implementation libs.logback.core - implementation libs.google.guava - implementation libs.protobuf.java - implementation libs.slf4j.api - implementation(libs.grpc.protobuf) { - exclude(module: 'animal-sniffer-annotations') - exclude(module: 'guava') - } - implementation(libs.grpc.stub) { - exclude(module: 'animal-sniffer-annotations') - exclude(module: 'guava') - } - } - - sourceSets.main.java.srcDirs += [ - 'build/generated/source/proto/main/grpc', - 'build/generated/source/proto/main/java' - ] - - protobuf { - protoc { - artifact = "com.google.protobuf:protoc:${protocVersion}" - } - plugins { - grpc { - artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" - } - } - generateProtoTasks { - all()*.plugins { grpc {} } - } - } -} configure(project(':assets')) { dependencies { diff --git a/proto/build.gradle b/proto/build.gradle new file mode 100644 index 00000000000..4336f76d774 --- /dev/null +++ b/proto/build.gradle @@ -0,0 +1,39 @@ +apply plugin: 'com.google.protobuf' + +dependencies { + annotationProcessor libs.lombok + compileOnly libs.javax.annotation + compileOnly libs.lombok + implementation libs.logback.classic + implementation libs.logback.core + implementation libs.google.guava + implementation libs.protobuf.java + implementation libs.slf4j.api + implementation(libs.grpc.protobuf) { + exclude(module: 'animal-sniffer-annotations') + exclude(module: 'guava') + } + implementation(libs.grpc.stub) { + exclude(module: 'animal-sniffer-annotations') + exclude(module: 'guava') + } +} + +sourceSets.main.java.srcDirs += [ + 'build/generated/source/proto/main/grpc', + 'build/generated/source/proto/main/java' +] + +protobuf { + protoc { + artifact = "com.google.protobuf:protoc:${protocVersion}" + } + plugins { + grpc { + artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" + } + } + generateProtoTasks { + all()*.plugins { grpc {} } + } +}