Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation incomplete #707

Open
WebTiger89 opened this issue May 16, 2023 · 2 comments
Open

Documentation incomplete #707

WebTiger89 opened this issue May 16, 2023 · 2 comments

Comments

@WebTiger89
Copy link

WebTiger89 commented May 16, 2023

The documentation is deprecated incomplete. No section which options are available to configure the tasks. No section how configuration is done with kotlin dsl. Instead you can read about instructions for versions from 2016, fucking time waste shit.

@ejona86
Copy link
Collaborator

ejona86 commented May 16, 2023

The documentation is not deprecated. It applies to the release that was done a few weeks ago.

No section which options are available to configure the tasks.

See the "Customize code generation tasks" section.

No section how configuration is done with kotlin dsl.

No, but generally people know how to do it given the groovy-centric documentation since mostly it is just syntax that is different. You can also take a look at the exampleKotlinDslProject.

@WebTiger89 WebTiger89 changed the title Documentation deprecated Documentation incomplete May 19, 2023
@WebTiger89
Copy link
Author

WebTiger89 commented May 19, 2023

My bad. I changed the title to "Documentation incomplete".

Given the fact that not all users are familiar with gradle, this documentation is shit for sure. There is so much missing. For example what exactly is the different between the lite version and non-lite version of protobuf dependency. How to add options to an element like java in Kotlin DSL:

generateProtoTasks {
        all().forEach { task ->
            task.builtins {
               id("java") { option("lite") }
            }
        }
    }

Gives me an error that java is already added, which makes sense, because it is added by default according to documentation but took me some time to figure out. While this doesn't work in a pure java/kotlin module it works in an android module. So how to add the "lite" option? Do I even need to add this option? How can I debug the protoc arguments which are generated by the plugin? Kotlin DSL pendants are missing. Do not refer to the fucking shit example please, it doesn't cover the builtins part.

A lot of questions for such simple actions. Would I have a more complex use case I had to study source code to get this shit running. For the question how to add an option to an exisiting element, I came up with:

generateProtoTasks {
        all().forEach { task ->
            task.builtins {
               named("java") { option("lite") }
            }
        }
    }

Not sure if it gets applied for java this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants