Comments (7)
Does it still fail if you remove the Eclipse sourceSets configuration? I'm suspicious of it. This is a very basic use-case, and it hasn't been failing elsewhere.
from protobuf-gradle-plugin.
No, it doesn't fail without the Eclipse sourceSets configuration.
from protobuf-gradle-plugin.
I figured it out. There is no eclipse
configuration in that configuration. EclipseModel (the thing at project.eclipse
) has no sourceSets
:
https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseModel.html
That means the sourceSets is just being applied to project, so it is the same as:
sourceSets {
main {
java.srcDirs += ["build/generated/source/proto/main/java"]
}
}
And that is clearly broken, as it adds a folder generated by the task without the task.
Modifying sourceSets shouldn't be necessary any more for Eclipse. Just applying the eclipse plugin should be enough. So I'd recommend just deleting that eclipse
block.
from protobuf-gradle-plugin.
True! I just copied the first answer from StackOverflow that worked - it might be clearly broken but no error/warning is issued and it worked until ... it stopped working 🤷♂️
Just applying the eclipse plugin should be enough.
Perhaps it should. But it's not. I'm using noweclipse.classpath.file.whenMerged { classpath -> ... }
and hoping it will work longer than the last answer I copied from StackOverflow.
from protobuf-gradle-plugin.
Perhaps it should. But it's not.
How was it breaking?
from protobuf-gradle-plugin.
build/generated/source/proto/main/java is not added as source folder to .classpath, that is,
<classpathentry kind="src" path="build/generated/source/proto/main/java">
is missing in the file.
If added manually, it is removed whenever the project is refreshed (with "Refresh Gradle project")
But this behavior, right or wrong, has nothing to do with this issue, which can be closed.
from protobuf-gradle-plugin.
Hmm... That should have been improved by #601 (add directories to sourceSet), and then fully fixed with #590 (eagerly make the output directories) . I wonder if they had a recent behavior change. We do have a test that is passing, so we may need to try different versions.
Feel free to open another issue for that eclipse issue.
from protobuf-gradle-plugin.
Related Issues (20)
- When using a shared read only dependency cache in Gradle, generateProto attempts to change the permission
- Update ExecutableLocator to be compatible with the Gradle Provider API
- Could not find method protobuf() HOT 5
- How to avoid package proto files into apk HOT 1
- Unable to use lite version - multiple versions of class HOT 31
- 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
- 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
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.