-
Notifications
You must be signed in to change notification settings - Fork 3
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
Extend SecretsVault Configuration Options and Fixes #3
Conversation
...vaultplugin/src/main/kotlin/com/commencis/secretsvaultplugin/SourceSetToSecretFileMapping.kt
Outdated
Show resolved
Hide resolved
secretsvaultplugin/src/main/kotlin/com/commencis/secretsvaultplugin/utils/CodeGenerator.kt
Outdated
Show resolved
Hide resolved
secretsvaultplugin/src/main/kotlin/com/commencis/secretsvaultplugin/KeepSecretsTask.kt
Outdated
Show resolved
Hide resolved
secretsvaultplugin/src/main/kotlin/com/commencis/secretsvaultplugin/KeepSecretsTask.kt
Outdated
Show resolved
Hide resolved
val textBuilder = StringBuilder(file.readText(Charset.defaultCharset())) | ||
flavors.forEachIndexed { index, flavor -> | ||
if (flavor == MAIN_SOURCE_SET_NAME) { | ||
val secretsFile = project.file("${pluginSourceFolder.get().path}/cpp/$SECRETS_CPP_FILE_NAME") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is using /
safe? Maybe we should consider using File.separator instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The forward slash (/) is a legal path separator on both Windows and Unix-based systems. Thus, it's universally accepted across these platforms. You can find more details on this StackOverflow answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.
Summary
This PR introduces enhancements to the SecretsVault plugin configuration, provides multi-dimensional flavor support, integrates deeper with CMake, and facilitates integration with DI frameworks. It also addresses several refinements such as code formatting, critical bug fixes, and improvements.
Changes
Multi-dimensional Flavor Support:
sourceSetSecretsMappingFile
to map specific secrets files to different source sets. This facilitates multi-dimensional flavor configurations in Android projects, allowing developers greater flexibility in managing secrets across flavors.CMake Configuration:
cmake
block within thesecretsVault
configuration to specifyprojectName
andversion
for the CMake project.Dependency Injection Support:
makeInjectable
flag. When true, the generated Kotlin class includes the@Inject
annotation.Optimization:
Code Refactoring:
Bug Fix:
Documentation Updates: