grpc-kotlin icon indicating copy to clipboard operation
grpc-kotlin copied to clipboard

No Output Files Are Generated!!!

Open prodbyola opened this issue 1 year ago • 1 comments

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.

prodbyola avatar Nov 05 '23 21:11 prodbyola

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

jamesward avatar Nov 06 '23 14:11 jamesward