Closed cretz closed 6 years ago
~/gradle-4.8.1/bin/gradle :protoc-gen-kotlin:protoc-gen-kotlin-jvm:assemble
Results in the same error
This looks to be a Kotlin + Gradle 4.8 thing. I see it at https://github.com/JetBrains/kotlin-native-calculator-sample/issues/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.
Wonder if adding gradle wrapper scripts (gradlew) would be good -- so you could ensure folks are using the known working version of gradle?
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).
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.
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.
@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
?
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
.
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.
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.
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: