Comments (3)
SGTM. Since true dependencies would be passed to protoc
with -I
we will need to make it more obvious which files will be code generated and which will just be used for compilation.
from protobuf-gradle-plugin.
The reason those are called dependencies (I refer to protobuf
and testProtobuf
and whatever other sources you have) is because they truly are archive files, jar, zip, tar, etc, which contain .proto files that are shared.
While we definitely DO NOT want to share pre-compiled Java classes, as it causes all kinds of runtime linking errors if versions of Google's Protobuf Library don't match, but the usecase of sharing the actual protos is very valid. At my place of employment, we have a shared domain model dictionary in a form of proto files, which we version and have checked into Artifactory as a tarball. So for us it is definitely a dependency that looks like protobuf group: 'com.*.protos', name: 'protos-data', version: '1.+', ext: 'tar.gz'
. That does not prevent you to have a source set for locally residing proto files, which the plugin also supports, to be living in src/main/protos, and if the files are there, they will automatically be included.
It seems like the issue is really between what do we pass as files for protoc to compile vs. which files get passed in as -I
arguments. But I would definitely NOT remove the support of being able to declare protobuf file archives as build artifact dependencies.
Also, see comments in #8 (comment)
Thoughts?
from protobuf-gradle-plugin.
As far as I can tell, this feature has been well used by API services that publish protos as artifacts. We can spare it for now :)
from protobuf-gradle-plugin.
Related Issues (20)
- How config proto src dir when proto files import by path HOT 2
- Java keyword "public" not escaped during proto generation HOT 1
- doc improvement HOT 1
- How can I disable registering the generated Java code as sources? HOT 7
- KSP dependency on generateProto - unable to build project due to KspTaskJvm issue HOT 1
- Fail on protoc warnings HOT 1
- Feature Request: Allow configuration of java executable HOT 2
- Kotlin only generated classes HOT 2
- extractIncludeProto execute so slowly
- protobuf dependency configuration is marked consumable
- Gradle Java project running into many proto related errors "cannot find symbol" randomly on compiling Java srcs HOT 1
- Plugin not compiling java code after migration from 0.8.19 -> 0.9.0 HOT 8
- Update sample to use latest plugin version HOT 1
- How can I compile proto files using Protobuf Editions HOT 1
- Compilation of the generated code fails with protobuf 4.26.0 HOT 3
- Example/documentation for generating kotlin classes with kotlin DSL HOT 1
- Use plural form default output directory 'generated/sources'
- Kotlin only proto Unresolved reference
- Issue compiling protos... HOT 4
- Option to disable/customize `sourceSets` for protoc plugins
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf-gradle-plugin.