Use protobuf-gradle-plugin to replace a system dependency

This commit is contained in:
iadgovuser29 2023-09-24 11:59:32 -04:00
parent 23d3d61448
commit b3481f1668

View File

@ -1,6 +1,7 @@
plugins { plugins {
id 'java' id 'java'
id 'io.spring.dependency-management' version '1.1.0' id 'io.spring.dependency-management' version '1.1.0'
id 'com.google.protobuf' version '0.9.4'
} }
java { java {
@ -50,13 +51,18 @@ dependencies {
annotationProcessor libs.lombok annotationProcessor libs.lombok
} }
task generateProtoBuf(type:Exec) { protobuf {
workingDir 'config' protoc {
artifact = 'com.google.protobuf:protoc:3.24.3'
commandLine './genJavaProtoBuf.sh' }
}
sourceSets {
main {
proto {
srcDir '../HIRS_ProvisionerTPM2/src'
}
}
} }
compileJava.dependsOn generateProtoBuf
test { test {
useJUnitPlatform() useJUnitPlatform()