You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am using protobuf plugin (v 0.8.16 / gradle version 6.9) and compilation itself working fine, but I have IntellijIdea integration problems
IDE wasn't able to find generated classes. They are all red. Proto sources located in default directory src/main/proto and generated sources are located at build/generated/source/proto/main and according to documentation should be attached automatically.
This plugin integrates with the idea plugin and automatically registers the proto files and generated Java code as sources.
I connected protoc-gen-validate extension and plugin successfully extracted include protos to build/extracted-include-protos/main/validate/validate.proto but IDE highlight import "validate/validate.proto"; red and wasn't able to locate it.
Content of my build gradle:
plugins {
id 'org.springframework.boot' version '2.3.12.RELEASE'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'com.google.protobuf' version '0.8.16'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
maven {
url "https://packages.confluent.io/maven/"
}
}
protobuf {
plugins {
javapgv {
artifact = "io.envoyproxy.protoc-gen-validate:protoc-gen-validate:0.4.1"
}
}
generateProtoTasks {
all()*.plugins {
javapgv {
option "lang=java"
}
}
}
}
dependencies {
implementation 'io.confluent:kafka-protobuf-serializer:6.2.0'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.kafka:spring-kafka'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'io.envoyproxy.protoc-gen-validate:pgv-java-stub:0.4.1'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.kafka:spring-kafka-test'
}
test {
useJUnitPlatform()
}
The text was updated successfully, but these errors were encountered:
nikoncode
changed the title
Gradle integration problems
IDE integration problems
Jul 9, 2021
Hi. I am using protobuf plugin (v 0.8.16 / gradle version 6.9) and compilation itself working fine, but I have IntellijIdea integration problems
src/main/proto
and generated sources are located atbuild/generated/source/proto/main
and according to documentation should be attached automatically.protoc-gen-validate
extension and plugin successfully extracted include protos tobuild/extracted-include-protos/main/validate/validate.proto
but IDE highlightimport "validate/validate.proto";
red and wasn't able to locate it.Content of my build gradle:
The text was updated successfully, but these errors were encountered: