google / secrets-gradle-plugin

A Gradle plugin for providing your secrets to your Android project.
Apache License 2.0
1.14k stars 99 forks source link

Multi-Module Gradle Support #14

Closed ErickSumargo closed 3 years ago

ErickSumargo commented 3 years ago

Hi @arriolac, First of all, great plugin! It helps me reduce some boilerplate I used to write for extracting keys stored in e.g., gradle.properties file.

But I have a use case where I want the generated keys are visible not limited to com.android.application module only, but com.android.library modules as well. Even better, I want my keys are generated in a certain module only, but I don't find such abilities in the current plugin version.

Btw, I've made a local workaround for this case. I'd be ready to submit my PR if my requirement is eligible enough treated as a "feature request". Thank you.

arriolac commented 3 years ago

Hi @ErickSumargo, I think that's a perfectly valid use case. Before submitting a pull request, can you comment here if that creates any API changes (if any)?

ErickSumargo commented 3 years ago

Absolutely no changes to the existing core logic API @arriolac. But some extension are needed.

In detail, literally I only need to expose LibraryExtension type and have the SecretPlugin read the libraryVariants from it with the same closure inject logic.

arriolac commented 3 years ago

Gotcha. Feel free to send a PR and we can go it from there. Thanks!