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

Extend SecretsVault Configuration Options and Fixes #3

Merged
merged 24 commits into from
Sep 4, 2023
Merged

Conversation

azizutku
Copy link
Contributor

@azizutku azizutku commented Aug 18, 2023

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:

    • Introduced 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:

    • New cmake block within the secretsVault configuration to specify projectName and version for the CMake project.
  • Dependency Injection Support:

    • Introduced makeInjectable flag. When true, the generated Kotlin class includes the @Inject annotation.
  • Optimization:

    • Reuse common CPP files across source sets to reduce boilerplate code generation.
  • Code Refactoring:

    • Reformatted the code to maintain consistency throughout the project.
    • Moved companion objects to the end of Kotlin classes for improved code style.
  • Bug Fix:

    • Addressed an issue where, if secrets for the main source set were not defined, the plugin incorrectly attempted to add a non-existent native library to the project.
    • Removed colons from MD5 when parsing app signatures to eliminate potential errors.
  • Documentation Updates:

    • Updated plugin documentation to reflect the new changes.

@azizutku azizutku requested a review from opsenes August 18, 2023 10:12
@azizutku azizutku self-assigned this Aug 18, 2023
README.md 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")
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

README.md Outdated Show resolved Hide resolved
@opsenes opsenes self-requested a review August 21, 2023 15:02
@azizutku azizutku merged commit d8ed520 into main Sep 4, 2023
1 check passed
@azizutku azizutku deleted the develop branch September 4, 2023 07:44
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

Successfully merging this pull request may close these issues.

4 participants