grpc / grpc-kotlin

Kotlin gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/kotlin
Apache License 2.0
1.2k stars 165 forks source link

No Output Files Are Generated!!! #452

Open prodbyola opened 1 year ago

prodbyola commented 1 year ago

Building with Jetpack Compose and following this example: https://github.com/grpc/grpc-kotlin/blob/master/examples/stub/build.gradle.kts, I have tried to generate kotlin/java from proto declarations but it seems no output file is generated. I cannot find output files anywhere.

dependencies {
    //    GRPC Dependencies
    api("io.grpc:grpc-stub:${rootProject.ext["grpcVersion"]}")
    api("io.grpc:grpc-protobuf:${rootProject.ext["grpcVersion"]}")
    api("com.google.protobuf:protobuf-java-util:${rootProject.ext["protobufVersion"]}")
    api("com.google.protobuf:protobuf-kotlin:${rootProject.ext["protobufVersion"]}")
    api("io.grpc:grpc-kotlin-stub:${rootProject.ext["grpcKotlinVersion"]}")
}

protobuf {
    protoc {
        artifact = "com.google.protobuf:protoc:${rootProject.ext["protobufVersion"]}"
    }
    plugins {
        create("grpc") {
            artifact = "io.grpc:protoc-gen-grpc-java:${rootProject.ext["grpcVersion"]}"
        }
        create("grpckt") {
            artifact = "io.grpc:protoc-gen-grpc-kotlin:${rootProject.ext["grpcKotlinVersion"]}:jdk8@jar"
        }
    }
    generateProtoTasks {
        all().forEach {
            it.plugins {
                create("grpc")
                create("grpckt")
            }
            it.builtins {
                create("kotlin")
                create("java")
            }
            it.addIncludeDir(fileTree("full-path-to-input-folder"))
        }
    }
}

Running ./gradlew generateProto is successful but I can't find output files or declarations.

Screenshot 2023-11-05 at 10 24 33 PM

Thanks for your help.

jamesward commented 1 year ago

They should be in your project's build dir. If not, I will likely need a project that reproduces the issue.