google / google/protobuf-gradle-plugin

Generated files base directory should be exposed as public property or at least a provider

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

Description

The `com.google.protobuf` plugin (as of version `0.9.3`) has `ProtobufExtension#getGeneratedFilesBaseDirProperty` method with `@PackageScope`. This prevents at least Kotlin DSL users from modifying this directory except via deprecated setter method.

I would expect this method to be public and return `DirectoryProperty` (or `Provider` if you intend to prevent modification). To allow user to address its subdirectories.

Also the plugin use `generated/source/proto/` instead of more conventional `generated/sources/proto/` (word `sources` in plural) alongside annotation processors output.

I currently have 3 cases where I want to access this property:

* to mark relevant directories as generated sources in the IDE
* to add them to the sources jar
* to place them under `generated/sources/`

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.