Comments (11)
I can see that. I wonder if gradle 4.8 was some of the reasons I was having trouble using the protobuf gradle plugin/pb and k as well. I can give that a go later this evening.
from pb-and-k.
I did a careful controlled test on OSX and I must have accidentally set the path wrong or something like that the first time. Works fine when the protoc-gen-kotlin script is on the path.
from pb-and-k.
Just for some added data. Issue #1 refers to my efforts on osx.. but even on linux I run into problems. For example on a linux (via google cloud shell, and running from the top of the newly cloned repo)..
~/gradle-4.8.1/bin/gradle :protoc-gen-kotlin:protoc-gen-kotlin-jvm:installDist
results in:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':runtime:runtime-common:classes'.
> Task with path 'compileJava' not found in project ':runtime:runtime-common'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
from pb-and-k.
~/gradle-4.8.1/bin/gradle :protoc-gen-kotlin:protoc-gen-kotlin-jvm:assemble
Results in the same error
from pb-and-k.
This looks to be a Kotlin + Gradle 4.8 thing. I see it at Kotlin/kotlin-native-calculator-sample#8 too. I have confirmed this issue happens on Gradle 4.8.1 and I have confirmed the build is successful in Gradle 4.7. I will make sure to put that requirement in the docs.
from pb-and-k.
Wonder if adding gradle wrapper scripts (gradlew) would be good -- so you could ensure folks are using the known working version of gradle?
from pb-and-k.
It might be...I try to avoid it even though it is common practice. I don't include a certain working JDK :-) If the Gradle 4.8 thing is not fixed soon or this becomes an issue that is too much to document, I will start distributing it. But in general I don't like putting binaries/libs in the repo especially on projects that are usually used in other ways (i.e. as deps or with downloads).
from pb-and-k.
Also I need to note that on macOS (and test on Linux too) that the --plugin
arg is required and the target dir needs to be present.
from pb-and-k.
@Radisovik - can you confirm that you absolutely have to give the --plugin
arg to protoc
even if protoc-gen-kotlin
is on the PATH
and executable on macOS? In other words can you show me the output without the --plugin
arg and the output of which protoc-gen-kotlin
?
from pb-and-k.
I have independently confirmed on Linux that if the protoc-gen-kotlin
is on the PATH
it does not have to be specified via --plugin
.
from pb-and-k.
I put the Gradle version requirement and the runtime lib build instructions in the README. If it is needed to explicitly supply --plugin
on macOS, as confirmation requested above, then I will update the README to mention that.
from pb-and-k.
Related Issues (12)
- gradle installDist fails with error HOT 17
- Repeated fields of non-numeric values should be marked "never packed" HOT 1
- needs javascript example HOT 18
- Kotlin Native support HOT 4
- If no package is set then compile fails HOT 4
- Is it possible to support generate .proto file from a .kt model file? HOT 4
- Support pluggable grpc service generation via ServiceLoader-like plugin HOT 2
- Packed Bool EOF Conformance Test Failure in Latest Protobuf Suite HOT 2
- Gradle 5.0 Compat/Update
- [Feature Request] Support for visibility config
- Provide a protoc-gen-kotlin maven artifact that's compatible with the protobuf gradle plugin
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 pb-and-k.