google / google/protobuf-gradle-plugin

Execution failed for task ':app:generateDebugProto'. > protoc: stdout: . stderr: Missing output directives.

Open
#705 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Groovy
Stars
1.8k
Forks
288
PR merge metrics
No merged PRs in 30d

Description

It looks like I am receiving this error:

```
Execution failed for task ':app:generateDebugProto'.
> protoc: stdout: . stderr: Missing output directives.
```

I believe I have correctly configured both my project and app level gradles:

project gradle

```
buildscript {
dependencies {
classpath "com.google.protobuf:protobuf-gradle-plugin:$proto_version"
}
}

plugins {
id 'org.jetbrains.kotlinx.kover' version "$kover_version"
id "com.google.protobuf" version "$proto_version" apply false
}

```
app gradle

```
apply plugin: 'com.google.protobuf'
apply plugin: 'com.android.application'

protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.21.12'
}
plugins {
javalite {
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
}
}
generateProtoTasks {
ofSourceSet("main").forEach { task ->
task.builtins {
getByName("java") {
option("lite")
}
getByName("kotlin") {
option("lite")
}
}
task.plugins {
javalite { }
}
}
}
}

dependencies {
implementation 'com.google.protobuf:protobuf-javalite:3.23.0'
implementation 'com.google.protobuf:protobuf-kotlin-lite:3.23.0'
}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.