google / google/protobuf-gradle-plugin
is already defined
- Dominant language
- Groovy
- Stars
- 1.8k
- Forks
- 288
- PR merge metrics
- No merged PRs in 30d
Description
I have hundreds of proto files which are defined in a way that they contain the exact same names for classes but each file has a different `java_outer_classname` but the protoc compiler does not take it into account at all and refuses to compile.
Is there a way to enable this behavior? There's no way for me to change the definition of proto files as I am not the owner.
my build.gradle.kts:
```
import com.google.protobuf.gradle.*
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.google.protobuf)
}
dependencies {
implementation("com.google.protobuf:protobuf-lite:3.0.0")
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:4.28.2"
}
generateProtoTasks {
all().forEach {
it.builtins {
getByName("java") {
option("lite")
}
}
}
}
}
sourceSets {
main {
proto {
srcDir("src/main/resources")
}
java {
srcDir("src/main/java")
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.